At a first look, the answer is 'yes'. I'll study the sample in depth.
The only difference I noted is that you used
Public Shadows ReadOnly Property Items() As ObjectCollection
while I used
Public Shadows ReadOnly Property Items() As ImageComboItemCollection
Do you think that the different type of the collection can be responsible
for the problem I have?
Thany you, Mick, for helping me...
Carlo
-------------------------------------------
Carlo, MCP (Windows Based Applications)
carlodevREMOVE@gmail.com
"Mick Doherty"
<EXCHANGE#WITH@AND.REMOVE.SQUAREBRACKETS.[mdaudi100#ntlworld.com]> ha
scritto nel messaggio news:uVrON%2337FHA.2364@TK2MSFTNGP12.phx.gbl...
[quoted text, click to view] > Does the example on my site help you out at all?
>
http://www.dotnetrix.co.uk/combobox.html
>
> --
> Mick Doherty
>
http://dotnetrix.co.uk/nothing.html >
>
> "Carlo" <carlodevREMOVE@gmail.com> wrote in message
> news:Oaa6O727FHA.3224@TK2MSFTNGP09.phx.gbl...
>> 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
>>
>>
>>
>> -------------------------------------------
>> Carlo, MCP (Windows Based Applications)
>> carlodevREMOVE@gmail.com
>>
>>
>>
>
>