Selectively italicizing ComboBox items

  • Thread starter Thread starter mkarlesky
  • Start date Start date
M

mkarlesky

I'm working on my very first Windows Mobile project.

I need to selectively set the text of certain items within a ComboBox
to be displayed in italics. I read up on ower draw for ComboBoxes only
to learn that it's not supported in .Net compact framework.

After extensive searching on MSDN, newsgroups, and the web I'm still
not entirely sure how best to approach this. I'd prefer to customize/
override/handle events on the existing ComboBox rather than create a
custom control from scratch.

I've done a bit with customizing existing controls on the desktop by
handling OnPaint and such. Can someone explain the best mechanism to
accomplish what I need to do and give me a push in the right
direction? I think I can take it from there.

Thanks in advance.

Mike Karlesky
 
I'm not a "UI Guy" and so I've never even thought of doing it, but if I were
to have to I probably take a look at the owner-drawn list in OpenNETCF's SDF
(yes it seems like a shameless plug, but I've not seen anyone else do it and
provide source, so even without the vested interest I'd still go that route)
then eitehr try to replicate it to the native ComboBox, or just use the list
with a textbox and button.
 
Another option would be to use OpenNETCF's ControlEx class to host a native
ComboBox, which would give you access to all the "real" ComboBox
functionality.

FWIW, I did this because I needed an editable ComboBox in NETCF 1, but
finally gave up and rolled my own from scratch.
 
Back
Top