I have several items displayed in a ComboBox.
Only a subset of these items should be selectable, the others are for
display purposes.
What is the best way to handle this. Via an event or create a subclass to
do it?
Morten Wennevik - 28 Feb 2005 16:36 GMT
Hi Nick,
You could do it by handling the DrawItem event (setting drawmode to either
of the ownerdrawn ones).
Set selection color only on valid items making the other items appear
nonselectable. If they still select one of those, detect it and either
change the selection or ownerdraw to make it appear as nothing selected.

Signature
Happy Coding!
Morten Wennevik [C# MVP]