C
Carlo
Hello
I'm writing an enhanced version of ComboBox (that inherits from
Windows.Forms.ComboBox) that can display images close to the text.
I've replaced the default Item collection (ComboBox.ObjectCollection, that
is a collecion of Object objects) with my own collection
(ImageComboBoxItemCollection) that holds a number of custom
ImageComboBoxItem items that inherits from Object.
Editor(GetType(ImageComboItemCollectionEditor), GetType(UITypeEditor))> _
Public Shadows ReadOnly Property Items() As ImageComboItemCollection
Everything works fine (serialization included), except for the Overrides of
OnDrawItem that does NOT works. Debugging the ComboBoxEx, I've noted that
OnDrawItem is never called.
If I try to suppress the Shadowing of Items Property, everithing is working
fine again, and OnDrawItem is properly called again.
What's wrong?
Thank you.
Carlo
I'm writing an enhanced version of ComboBox (that inherits from
Windows.Forms.ComboBox) that can display images close to the text.
I've replaced the default Item collection (ComboBox.ObjectCollection, that
is a collecion of Object objects) with my own collection
(ImageComboBoxItemCollection) that holds a number of custom
ImageComboBoxItem items that inherits from Object.
Editor(GetType(ImageComboItemCollectionEditor), GetType(UITypeEditor))> _
Public Shadows ReadOnly Property Items() As ImageComboItemCollection
Everything works fine (serialization included), except for the Overrides of
OnDrawItem that does NOT works. Debugging the ComboBoxEx, I've noted that
OnDrawItem is never called.
If I try to suppress the Shadowing of Items Property, everithing is working
fine again, and OnDrawItem is properly called again.
What's wrong?
Thank you.
Carlo