I am trying unsuccessfully to set the text of a toolbarbutton at runtime.
The button was added to the toolbar.buttons.collection at designtime. Is
there a trick to doing this, or am I missing something? Does the
toolbarbuttons Text property have to be set prior to adding the button to the
toolbar's buttons collection?
Thanks
"JT" <Jthayer@online.nospam> schrieb:
>I am trying unsuccessfully to set the text of a toolbarbutton at runtime.
> The button was added to the toolbar.buttons.collection at designtime.
\\\
Me.ToolBar1.Buttons(2).Text = "Hello"
///
- or -
\\\
Me.ToolBarButton1.Text = "Hello"
///
... work fine for me.

Signature
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://dotnet.mvps.org/dotnet/faqs/>
JT - 18 Feb 2005 20:09 GMT
Very strange. That code is obviously what I tried - it did not and does not
work for me. In any case, I have abandoned the toolbar idea and am instead
using a panel of buttons, so the problem is not holding me up anymore.
Thanks.
JT
> "JT" <Jthayer@online.nospam> schrieb:
> >I am trying unsuccessfully to set the text of a toolbarbutton at runtime.
[quoted text clipped - 11 lines]
>
> .... work fine for me.