Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Windows Forms / WinForm Controls / February 2005

Tip: Looking for answers? Try searching our database.

how to set toolbarbutton text

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
JT - 18 Feb 2005 18:05 GMT
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
Signature

John

Herfried K. Wagner [MVP] - 18 Feb 2005 18:27 GMT
"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.

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.