Click here to Skip to main content
65,938 articles
CodeProject is changing. Read more.
Articles
(untagged)

myComboBox

0.00/5 (No votes)
25 Jul 2006 1  
how to make the standard combobox to drop custom controls

Sample Image - myComboBox.gif

Introduction

I needed to drop a custom control when the comboBox button is pressed, so i adapt the comboBox to drop what i want. This article explain how to make a standard ComboBox to drop a custom control. You can use that method to drop a dataGridView in a datagridview if you need. I need to override the WndProc method of the ComboBox to stop the ComboBox to display the standard list.When the comboBox button is pressed, the message is captured and canceled and is shown a ToolStripDropDown control that contain the custom control. The custom control is dropped as a ToolStripDropDown, so we need a ToolStripControlHost to host the control that we want to drop. Have fun!

References

Refer to the MSDN topic for more details.

License

This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.

A list of licenses authors might use can be found here