Skip to main content
GameDev.net gamedev.net
🔒 Locked

C# Combobox problem

Started by ISOPimp Nov 27, 2002 at 3:55 PM 3 replies 400+ views
Original Post
ISOPimp
ISOPimp
Anyone know how to get a C# ComboBox Control to be smaller than the default height? I tried to inherit the control but nothing I change is giving me the results I want. Also, if I have to Draw the combobox myself, can someone give me some links to do this. Thanks, Micah
djkno3
djkno3
What do you mean by smaller? if you mean the actual height try changing the font (height) in the properties tab. If you mean the amount it drops down that is also in the properties (MaxDropDownItems) other than that I can''t help ya unless you define size a bit better.
ISOPimp
ISOPimp
Okay, here is a screenshot of my combobox (on a listview control)



What I initially wanted to do was shrink the size so that it would be the same as a listview row (14 pixels). If I did that though, then the inside text would get cut off. So, I also need to remove the borderstyling around the combobox. I am thinking of something like this: (I just edited in MSPaint)



It doesn''t have to be exactly the same, I just want it to be the same sized text, but with nothing overlapping.
ISOPimp
ISOPimp
Back to the top you go.

Maybe a link to tutorial on custom c# combobox drawing is what I need?
djkno3
djkno3
check www.codeproject.com maybe somone can help there... I''m sorry but other then handling the OnDraw() for the combo box and makeing the window frame "fixed" instead of "Fixed3d" I don''t know

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.