Checked Listbox help needed

  • Thread starter Thread starter alex
  • Start date Start date
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
 
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
 
* 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'?
 
Back
Top