Click here to Skip to main content
Click here to Skip to main content

myComboBox

, 25 Jul 2006 CPOL
Rate this:
Please Sign up or sign in to vote.
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, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

Share

About the Author

funygel
Web Developer
Romania Romania
Student

Comments and Discussions

 
QuestionThanks! PinmemberMember 98879286-Mar-13 1:26 
GeneralThanks PinmemberArchambault2-Mar-07 6:14 
GeneralRe: Thanks Pinmemberfunygel4-Mar-07 10:22 
GeneralRe: Thanks PinmemberArchambault5-Mar-07 4:15 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.

| Advertise | Privacy | Terms of Use | Mobile
Web01 | 2.8.1411023.1 | Last Updated 25 Jul 2006
Article Copyright 2006 by funygel
Everything else Copyright © CodeProject, 1999-2014
Layout: fixed | fluid