Click here to Skip to main content
Licence CPOL
First Posted 25 Jul 2006
Views 21,379
Downloads 1,195
Bookmarked 20 times

myComboBox

By | 25 Jul 2006 | Article
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)

About the Author

funygel

Web Developer

Romania Romania

Member

Student

Sign Up to vote   Poor Excellent
Add a reason or comment to your vote: x
Votes of 3 or less require a comment

Comments and Discussions

 
You must Sign In to use this message board. (secure sign-in)
 
Search this forum  
 FAQ
    Noise  Layout  Per page   
  Refresh
GeneralThanks PinmemberArchambault5:14 2 Mar '07  
GeneralRe: Thanks Pinmemberfunygel9:22 4 Mar '07  
GeneralRe: Thanks PinmemberArchambault3:15 5 Mar '07  

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.

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