Iterating over toolbar buttons

  • Thread starter Thread starter Sean Connery
  • Start date Start date
S

Sean Connery

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?
 
Never mind. Figured it out. The format is:

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