all groups > dotnet windows forms designtime > november 2005 >
You're in the

dotnet windows forms designtime

group:

My ComboBoxEx is not working


My ComboBoxEx is not working Carlo
11/22/2005 12:00:00 AM
dotnet windows forms designtime: 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


Re: My ComboBoxEx is not working Mick Doherty
11/22/2005 12:00:00 AM
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


[quoted text, click to view]

Re: My ComboBoxEx is not working Carlo
11/22/2005 12:00:00 AM
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]

AddThis Social Bookmark Button