471,605 Members | 1,609 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,605 software developers and data experts.

Custom buttons in toolbar

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

Dec 14 '05 #1
1 2056
mo********@gmail.com wrote:
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 );

--
Jacky Kwok
jacky@alumni_DOT_cuhk_DOT_edu_DOT_hk
jacky@compose_DOT_com_DOT_hk
Dec 15 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

3 posts views Thread by I am Sam | last post: by
27 posts views Thread by Wayne | last post: by
7 posts views Thread by Marcolino | last post: by
6 posts views Thread by =?Utf-8?B?L2Rldi9udWxs?= | last post: by
1 post views Thread by XIAOLAOHU | last post: by
reply views Thread by MichaelMortimer | last post: by
reply views Thread by CCCYYYY | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.