Checked Listbox help needed

A

alex

Hi,
is there a way to

a) dissable a particular item in the checked listbox. i.e. I dont want
users to change its state
b) to change the font color/property of one item in the checked list box.

Thanks a lot
Alex
 
V

Vicky

a) use this event
Private Sub CheckedListBox1_ItemCheck(ByVal sender As Object, ByVal e As
System.Windows.Forms.ItemCheckEventArgs) Handles CheckedListBox1.ItemCheck

if e.Index = disable item index then

e.NewValue=Unchecked

end if

End Sub

b) i dont think its possible using normal way. might be using some api or so
it can be done

vicky
 
H

Herfried K. Wagner [MVP]

* alex said:
b) to change the font color/property of one item in the checked list box.

Why not use a ListView control with 'View' set to 'Details' and
'CheckBoxes' set to 'True'?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Top