Is it possible to disable certain items of a listbox instead of just the whole control? especially when its style is set to checkbox.
Printable View
Is it possible to disable certain items of a listbox instead of just the whole control? especially when its style is set to checkbox.
It is all or nothing.
Exactly what do you need to do. Perhaps we can come up with a suitable work around.
Locked how?Quote:
Originally Posted by Neverbirth
I'm just using two listboxes to display different categories in a couple of forms, one using checkbox style and which is being used to choose the categories to display, and the other is used to show, add, edit and delete them.Quote:
Originally Posted by Hack
I'd like to disable the items which aren't yet defined, but I don't really need to do so.
What do you mean by "defined"?
The categories are fully configurable, and are by default empty, so instead of showing nothing when they are not set I want them to be shown on list as something like "-- Not yet defined --".Quote:
Originally Posted by Hack
How is the listbox loaded?
What is your code?
You can decide if they are (not)"defined" when Click event fires and simply prompt the user.
He wouldn't necessarily even need to do that.Quote:
Originally Posted by gavio
Depending on how he is adding the items to the listbox, he can append "--Not Defined--" to the items so that they show in the listbox already labeled.
Well, I already do so. What I'd like is that those list items are disabled (just if possible). Using something like the click event makes the checkboxes change for a brief moment.Quote:
Originally Posted by Hack
I've anyway just found out about the itemcheck event, that can be used for this. Never tried it before.
Out of curiosity, were you thinking of some other method? I'm always grateful to hear different methods for a same thing.