Click here to Skip to main content
15,891,316 members
Please Sign up or sign in to vote.
5.00/5 (1 vote)
See more:
i want combo box to be drop up and not like regular drop down in windows form
application
so how can i go for this?
Posted

The only way you can do this is to create your own custom control that's derived from the .Net combobox.

EDIT ===================

Can I elaborate? Yeah - google is your friend. The process and art of writing a custom control is WAY beyond the scope of a "quick answer". You have to understand pretty much everything there is to know about how a control works, and how to change it to do what you want. It's not an easy task, and even the most experienced programmers flinch a little at the prospect. If you look around (using google), you might find a custom combobox that already does what you want.
 
Share this answer
 
v2
Comments
Toniyo Jackson 28-Jun-11 8:34am    
Yes. No other way
Sergey Alexandrovich Kryukov 28-Jun-11 20:32pm    
Agree in general, my 5, but I think inheriting from ComboBox will hardly help; OP would go deeper and derive from Control or CustomControl and combine ListBox with TextBox. By the way, this is how many customized 3rd-party "ComboBoxes" work.
--SA
To be honest, it'll probably be a lot more trouble than it's worth.

You would have to create a custom control based on a ComboBox, and trap the windows message CB_GETDROPPEDCONTROLRECT[^] to return a different rectangle - i.e. above the control rather than below.

I've never tried it - never wanted to, nor do I now - but it should work.

Good luck!
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900