473,394 Members | 1,965 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

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

Iterating over toolbar buttons

I have a toolbar that I would like to iterate over and dynamically set its
buttons Pushed property to false, but am not sure of how to do this. I
"guessed" at someting like the following:

for (int i=0; i < tbMain.Buttons.Count; i++)
{
// some kind of code to set the button propert to false
}

Does anyone have an idea of the proper syntax for this?
Nov 15 '05 #1
2 1476
Never mind. Figured it out. The format is:

foreach (ToolBarButton t in tbMain.Buttons)
{
t.Pushed = false;
}

"Sean Connery" <nf*@nospam.com> wrote in message
news:el**************@TK2MSFTNGP11.phx.gbl...
I have a toolbar that I would like to iterate over and dynamically set its
buttons Pushed property to false, but am not sure of how to do this. I
"guessed" at someting like the following:

for (int i=0; i < tbMain.Buttons.Count; i++)
{
// some kind of code to set the button propert to false
}

Does anyone have an idea of the proper syntax for this?

Nov 15 '05 #2
foreach (ToolBarButton btn in tbMain.Buttons)
{
btn.Pushed = false;
}

vJ

"Sean Connery" <nf*@nospam.com> wrote in message
news:el**************@TK2MSFTNGP11.phx.gbl...
I have a toolbar that I would like to iterate over and dynamically set its
buttons Pushed property to false, but am not sure of how to do this. I
"guessed" at someting like the following:

for (int i=0; i < tbMain.Buttons.Count; i++)
{
// some kind of code to set the button propert to false
}

Does anyone have an idea of the proper syntax for this?

Nov 15 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Raymond H. | last post by:
Bonjour, Est-il possible d'exécuter seulement un msgbox dans l'événement clik d'une ToolBar mais sans que le bouton en question (de la ToolBar) ne s'enfonce mais reste normal sans enfoncement ?...
11
by: N. Graves | last post by:
I have checked the "Alignment and Sizing" toolbar but when I want to use in on aligning several form object the toolbar buttons stay grayed out. What am I missing. Thanks! N. Graves
3
by: Michael C | last post by:
How on earth do you disable ToolBar Buttons and change the images on ToolBar buttons at run-time? Thanks, Michael C.
3
by: perspolis | last post by:
hi dears Can I have a toolbar with different button sizes???
9
by: Hugh | last post by:
after I changed the image size. I tried different combinations of images sizes and button sizes. I have tried both botton and the image in the same sizes or button size was larger than that of...
2
by: Ahmed | last post by:
Hello everyone, I am creating a toolbar for an application. The buttons contains images and text. I set the wrappable property for the toolbar to false so the toolbar does not add another line...
3
by: Meghezel | last post by:
I want to Make DropDownMenu for toolbar(just like Back or forward buttons of browser) takes its menuitems from Contextmenu filled with array of menuItems I could not handle the event of clicking...
0
by: CrimeMaster | last post by:
Hi My IE toolbar is based on the Microsoft sample KKBar. I have draw a lot of buttons on it in which some are simply pushDown buttons and some are dropdowns.Beside this I have Made a Setting...
6
by: =?Utf-8?B?L2Rldi9udWxs?= | last post by:
Hello, i am using visual studio 2003 enterprise architect version. I am making apps for the .Net framework 1.1. While testing an interface, i discovered something strange. In this application...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

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.