Free Trial

Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.

  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL
Help

Chapter 30. Buttons and Menus > Button Operations

Button Operations

Table 30-2 summarizes the operations on button widgets. In the table, $w is a button, checkbutton, radiobutton, or menubutton, except when noted. For the most part, these operations are used by the script libraries that implement the bindings for buttons. The cget and configure operations are the most commonly used by applications.

Table 30-2. Button operations
$w cget optionReturns the value of the specified attribute.
$w configure ?option? ?value? ...Queries or manipulates the configuration information for the widget.
$w deselectDeselects the radiobutton or checkbutton. Set the radiobutton variable to the null string. Set the checkbutton variable to the off value.
$w flashRedisplays the button several times in alternate colors.
$w invokeInvokes the command associated with the button.
$w selectSelects the radiobutton or checkbutton, setting the associated variable appropriately.
$w toggleToggles the state of the checkbutton, setting the associated variable appropriately.



  

You are currently reading a PREVIEW of this book.

                                                                                                                    

Get instant access to over $1 million worth of books and videos.

  

Start a Free 10-Day Trial


  
  • Safari Books Online
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint