New topic: 

A Question about Toolbuttons and Toolbars

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

       Page 1 of 1
   [ 2 posts ]                 Previous topic | Next topic         Author  
Message       tcbasic           Post subject: A Question about Toolbuttons and 
ToolbarsPosted: Fri Jan 22, 2010 10:12 pm                        
Joined: Sat Jun 30, 2007 11:21 pm
Posts: 66
Location: Pembroke Pines, FL (USA)              I've got a toolbar with a 
toggle style toolbutton on it.  How do I access the properties of the 
toolbutton to determine whether or not the button is pressed?  I need my app to 
do one thing if the button is toggled down and something else if it is toggled 
up.

Thanks.

Tom

RB2009r5.1
Windows Vista   
                            Top                computerfreaker           Post 
subject: Re: A Question about Toolbuttons and ToolbarsPosted: Sat Jan 23, 2010 
12:58 am                               
Joined: Thu Mar 05, 2009 1:03 pm
Posts: 1496
Location: USA              Not sure how well this will work in the latest 
version of RB, but it should...
Code:
//MyToolBar is a ToolBar, MyItem is a ToolItem
if MyItem IsA ToolButton then
  if MyItem.Pushed then
  MsgBox("MyItem is pressed!!")
  else
  MsgBox("MyItem isn't pressed!")
  end if
end if

     
_________________
With great power comes great responsibility.
Learn something new every day, and the rest will take care of itself.
Life is a journey, not a destination. Enjoy the trip!   
                            Top            Display posts from previous: All 
posts1 day7 days2 weeks1 month3 months6 months1 year Sort by AuthorPost 
timeSubject AscendingDescending          Page 1 of 1
   [ 2 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