The actionbutton
In Brief
On Mac, this command presents a platform native appearance button for the user to open a menu with actions to choose from.
On other platforms, this widget is not rendered at all as the Action button is Apple's (rather unimpressive) response to
the limitation of old Macs only supporting one mouse button as standard.
Programmers should also bind their menu to a right-click on an appropriate widget for non-Mac platforms.
This command is likely to be available in v0.12.
Commands
::tclmacbag::actionbutton pathName ?Options?
Available options:
- -image gears|plus|minus
Where -image is not called, the widget defaults to 'gears'.
This option became available in v0.17.
- -style pill|chrome|steel|simple|gel|safari|capsule
The actionbutton style to be used.
Style fashions change quite a bit in the Mac world. The 'safari' style is probably the most in vogue at the moment.
- -menu Menu
The menu to be opened when the button is clicked.
- -background colourLabel
This optional option sets the colour of the area which appears visually outside the button but inside the button widget.
This colour can be any standard colour name or label, such as '#AABB00' or 'white'. If this option is not used, this colour
will default to the Tile theme's standard background colour.
Example
grid [::tclmacbag::actionbutton .b -menu .menu]
Further Information
Usually, only button should appear per dialog/notebook tab, generally located in the toolbar.
This widget cannot/should not be set to disabled and does not allow a programmer selectable image.
As is standard, this widget returns with value of pathName, for ease of use with geometry managers like grid and pack.