Changing Toolbar Buttons at Run-time

  • Thread starter Thread starter Michael C
  • Start date Start date
M

Michael C

How on earth do you disable ToolBar Buttons and change the images on ToolBar
buttons at run-time?

Thanks,
Michael C.
 
Try this

//to disable toolbar button
toolBarButton1.Enabled = false;

toolBarButton1.ImageIndex = 1; //to change images.

Shak
 
Tried that Shakir, didn't work. Also thought I might be able to do
something like this:

toolBar1.Buttons[1].Enabled = false;
toolBar1.Buttons[1].ImageIndex = 1;

I found some info in the documentation, it looks like the Buttons collection
of a Toolbar is read-only ?! :( Also tried to .Clear() the ToolBar and
re-add the buttons, that didn't work either. Grrr....

I'd really like to get some .NET IDE style buttons up in here. Is it just
me or do the newest versions of MS languages seem to come with very limited
versions of the newer controls... or are they slight upgrades of the old
controls? None of the controls I keep running across in C#.NET seem to
compare with the functionality of the controls used in the IDE...

Thanks,
Michael C.
 
Back
Top