Listbox disable item

  • Thread starter Thread starter theoneandonlycc
  • Start date Start date
T

theoneandonlycc

Does anybody know how to disable a particular item in a listbox? I
know how to disable every single item but have a need to disable
certain items only to display them (greyed out) but not let the user
select them.

Any suggestions would be appreciated.

C
 
I don't know how to grey out the entries but you can use
Me.ListBox1.SetSelected(0, False) (where 0 is the
position in the items collection) in the handler of the
ListBox1.SelectedIndexChanged event to ensure a user
cannot select a particular entry.

hope that helps,
 
Back
Top