disabling individual items in a listbox

  • Thread starter Thread starter kranthi
  • Start date Start date
kranthi,

I don't know if it is possible. If anything, you can keep those items
from being selected by overriding the WndProc method and handling the
windows messages to those controls which control when selections are made.
Then, when an item that you want to "disable" is selected, you can prevent
it.

Hope this helps.
 
Hi,

AFAIK this is not possible, I don't remember ever seen such a behavior on a
listbox, what you can do is make them unselectable, you can intercept the
SelectedIndexChange event and check if the new selected index is to be
disabled then just do something about it:
1- go back to the previous selected one, you will need to keep track of this
in a int variable
2- select next/prev


Hope this help,
 
Back
Top