Itcl Highlighting Button Widget

Highlighting buttons are similar to standard Tk button widgets. However, they can be "attached" to other widgets in the interface. When the keyboard focus is owned by a widget which is attached to a highlighting button, the Return key can be used to invoke the button and the button is surrounded by a sunken border (Motif-style) to indicate this.

Synopsis

hbutton pathName ?options?
create a new highlighting button widget named pathName.
pathName option ?args...?
manipulate the highlighting button widget named pathName.

Options

Highlighting buttons support the same configuration options as normal Tk buttons and also:

Name: highlightWidth
Class: HighlightWidth
Command-Line Switch: -highlightwidth
Default: 4
The width of the highlight surrounding the button. The value of this option can be specified in any of the forms understood by Tk_GetPixels(3).

Name: highlightBorderWidth
Class: HighlightBorderWidth
Command-Line Switch: -highlightborderwidth
Default: 1
The width of the border of the highlight surrounding the button. The value of this option can be specified in any of the forms understood by Tk_GetPixels(3).

Name: N/A
Class: N/A
Command-Line Switch: -highlight
Default: 0
If set to 1, then the button is highlighted - the highlight-border surrounding the button appears sunken. If set to 0, then the button is not highlighted and the highlight border surrounding the button appears flat. This option should not generally by manipulated from a Tcl script - it is set by the bindings created by the attach widget command.

Widget Command

The highlighting button widget supports the operations of the standard Tk button widget and also:
pathName attach ?-cancel? \ widget ?widget ...?
If the -cancel option is not specified, the button is attached to the given widgets so that pressing the Return key when any of the widgets has the input focus invokes the button. The relationship between the button and the attached widgets will be shown by highlighting the button with a sunken border. If the -cancel option is specified, the button is attached to the given widgets so that pressing the Escape key when any of the widgets has the input focus invokes the button. In this case, the button is not highlighted when an attached widget has the input focus.


Nat Pryce (np2@doc.ic.ac.uk)