hwtk::button - Widget that issues a command when pressed
A hwtk::button widget displays a textual label and/or image, and evaluates a command when pressed.
hwtk::button - pathName ?option value? ...
-clientdata, clientData, ClientData
-helpcommand, helpcommand, Command
-textvariable, textVariable, Variable
-underline, underline, Underline
Command-Line Name: -command
Database Name: command
Database Class: Command
A script to evaluate when the widget is invoked.
Command-Line Name: -default
Database Name: default
Database Class: Default
May be set to one of normal, active or disabled. In a dialog box, one button may be designated the default button (meaning, roughly, the one that gets invoked when the user presses <Enter>). active indicates that this is currently the default button; normal means that it may become the default button, and disabled means that it is not defaultable. The default is normal. Depending on the theme, the default button may be displayed with an extra highlight ring, or with a different border color.
In addition to the standard configure, cget, identify, instate, and state commands, button support the following additional widget commands:
pathName invoke
Invokes the command associated with the button.
::hwtk::dialog .d -title "::hwtk::button"
set f [.d recess]
hwtk::button $f.b1 -text "Text Button" -help "Text only"
hwtk::button $f.b2 -image productHyperWorks-24.png -help "Image only"
hwtk::button $f.b3 -text "HyperWorks" -image productHyperWorks-24.png -compound left -help "Image and text compound left"
hwtk::button $f.b4 -text "HyperWorks" -image productHyperWorks-24.png -compound top -help "Image and text compound top"
pack $f.b1 $f.b2 $f.b3 $f.b4
.d post