Windows Develop Bookmark and Share   
 index > Windows Forms General > Making a button look like a combobox button... sort of
 

Making a button look like a combobox button... sort of

Hi there

I have a button that I want to look similar to the combobox drop down button.

It needs to have the same background (as defined by Windows) but I want to replace the down arrow with something else.

Is there a way to draw just the background? I've already used ComboBoxRenderer.DrawBackground()

and

ScrollbarRenderer.DrawArrowButton()

But they draw the forground as well.

What I want it the lovely blue gradient background (if you happen to be using the default blue theme in XP) but not the arrow.

Any suggestions?

Regards

Jero

JeroGrav  Tuesday, March 21, 2006 5:09 AM
Did you ever get an answer to your post of March this year, as I have a similar problem to solve.
DavidR100  Wednesday, August 02, 2006 1:57 PM
You should take a look around the VisualStyles namespace. You should find what you need there.
AndrewVos  Wednesday, August 02, 2006 2:56 PM

Unfortunately I didn't get this sorted very well. We eventually had to rig something up ourselves. The main problem with it is that it won't change its appearance if the desktop theme changes.

What I really needed was something in the VisualStyles area that would draw that gradient blue background that the dropdown button has - but without the arrow. Once you've got the background then you can put whatever you like on it.

Couldn't find that though

Sorry, its not the answer you are looking for but then again, its very possible that the functionality *is* there but I just didn't find it.

JeroGrav  Wednesday, August 02, 2006 8:32 PM

You can use google to search for other answers

Custom Search

More Threads

• Threads, Forms and Sockets
• C# Problem foreach
• I need a help. please help me
• Windows From top right corner buttons (c#)
• MSN Money-Like application
• Remoting Problem
• Web search.
• Windows Vista and Report Viewer (.rdlc)
• Combobox Selectionchangecommitted
• MS Access parameters C# sql