Custom buttons in toolbar

  • Thread starter Thread starter mookid8000
  • Start date Start date
M

mookid8000

Hello again, group!

Can someone tell me a nice way to include a zoom percentage combobox in
a toolbar?

My first try was a workaround, where I inserted a bunch of separators
where I wanted the combobox to be, and then painted the combobox on
top.

I'm just thinking, there must be a better way... :o)

Thanks in advance!

-mogens
 
Hello again, group!

Can someone tell me a nice way to include a zoom percentage combobox in
a toolbar?

My first try was a workaround, where I inserted a bunch of separators
where I wanted the combobox to be, and then painted the combobox on
top.

I'm just thinking, there must be a better way... :o)

Thanks in advance!

-mogens

The most simplest method is to use Dotnet2 and VisualStudio2005.
The new ToolStrip (a new Toolbar control) is allowed to contain
"ToolStripComboBox".

For Dotnet1.x and VisuallStudio.net 2002/2003.
The IDE itself cannot help you to put combobox in toolbar. However,
actually, toolbar is a container control. It can contain combobox. You
just need to add combobox in "ToolBar.Controls" by your own code.


ComboBox combobox = new ComboBox();
.....
//set any combobox properties , items
//size , position (in the toolbar)
.....
toolBar.Controls.Add(combobox );
 
Back
Top