New topic: 

Is there a way to access the Caption of a WebToolbar.item?

<http://forums.realsoftware.com/viewtopic.php?t=46019>

         Page 1 of 1
   [ 4 posts ]                 Previous topic | Next topic          Author  
Message        mpastor          Post subject: Is there a way to access the 
Caption of a WebToolbar.item?Posted: Thu Nov 22, 2012 12:22 pm                  
       
Joined: Sat Oct 18, 2008 4:58 pm
Posts: 108                I want to be able to read and write the value of a 
toolbar item from outside that item itself (anywhere else in the program).

Is there a provision for addressing toolbar items at that level?     

    Last edited by mpastor on Thu Nov 22, 2012 7:25 pm, edited 1 time in total. 
  
                             Top                npalardy          Post subject: 
Re: Is there a way to access the Caption of a toolbar.item?Posted: Thu Nov 22, 
2012 12:45 pm                       Real Software Engineer          
Joined: Sat Dec 24, 2005 8:18 pm
Posts: 7551
Location: Canada, Alberta, Near Red Deer                Scope rules apply to 
toolbars the same as any other item on a window.
If you can get a reference to the toolbar from the window then you can 
manipulate its items just like anything else.
http://docs.realsoftware.com/index.php/Toolbar      
_________________
My web site Great White Software
RBLibrary.com REALbasic learning  
                             Top                mpastor          Post subject: 
Re: Is there a way to access the Caption of a WebToolbar.itePosted: Thu Nov 22, 
2012 7:21 pm                         
Joined: Sat Oct 18, 2008 4:58 pm
Posts: 108                Thanks nplardy-
I should have been more specific.  My question pertained to WebToolbar - is 
nplardy's answer still valid?

I can access the toolbar - but can't figure out the syntax for anything beyond 
that.

I have tried things like:
Main.Toolbar1.ItemAtIndex(5).Caption = "Search"
Main.Toolbar1.ItemWithName("Search").Caption = "Search"

These don't work - the ".Caption" term is not recognized during compile time.

These particular WebMenuItems I am reaching for are WebToolbarContainers - but 
would like to know the answer for any WebToolbar item type.   
                             Top                mpastor          Post subject: 
Re: Is there a way to access the Caption of a WebToolbar.itePosted: Thu Nov 22, 
2012 10:48 pm                         
Joined: Sat Oct 18, 2008 4:58 pm
Posts: 108                OK - Figured it out...

  WebToolbarContainer(Main.Toolbar1.ItemWithName("ItemOfInterest")).Caption = 
"Search"   
                             Top             Display posts from previous: All 
posts1 day7 days2 weeks1 month3 months6 months1 year Sort by AuthorPost 
timeSubject AscendingDescending          Page 1 of 1
   [ 4 posts ]      
-- 
Over 1500 classes with 29000 functions in one REALbasic plug-in collection. 
The Monkeybread Software Realbasic Plugin v9.3. 
http://www.monkeybreadsoftware.de/realbasic/plugins.shtml

[email protected]

Reply via email to