Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Accessing parts of combobox

Status
Not open for further replies.

TJones8

Technical User
Apr 16, 2002
77
0
0
GB
Hi all.
I'm making a custom combobox and for ease of use deriving my ccontrol directly from the ComboBox class.
Is there any way I can access the button part of the combobox in order to show\hide it (ie if there are no list items, then hide the dropdown button).

If it's a no then i'm gonna have to go back to creating my own out of text boxes and buttons.

thx

if at first you don't succeed, get a 10lb lump hammer
 
You can 'hide' the drop down button by painting over it (or more accurately by not painting it at all!) when your derived combo box is painted.

Be aware that the combo box control is painted using the WM_PAINT message (not by the OnPaint event) and therefore you will need to override the WndProc procedure and intercept the WM_PAINT message.
 
OK thx
I'll work on this and get back to here if i get stuck.
which i envariably will...

thx again.

if at first you don't succeed, get a 10lb lump hammer
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top