NAME
gk_choice - Create a window with choices.
SYNOPSIS
- gk_choice pathname ?options?
STANDARD OPTIONS
activeBackground disabledForeground highlightThickness activeForeground font image textVariable anchor foreground justify underline background height padX width bitmap highlightBacground padY wrapLength borderWidth highlightColor relief cursor highlightThickness takeFocus
See the ``options'' manual entry for details on the standard options.
All of the options, except for -choices, -msg, and -title, by default are applied to all of the buttons. To see how to access the individual buttons see the Widget Command section.
WIDGET-SPECIFIC OPTIONS
Name: choices Class: Choices Command-Line Switch: -choices
-
Specifies what choices are to be given to the user. This is a list of text-command pairs, where the text is the text that is to appear on the button and command is the command that is executed when the button is invoked.
Name: command Class: Command Command-Line Switch: -command
-
This command is inherited from the Tk Button widget. By changing this value all of the buttons are given the same command. See the Tk Button widget for more details.
Name: message Class: Message Command-Line Switch: -msg
-
A command to be executed in order to create a message above the set of buttons. The top most window pathname for the widget is appended to the list of arguments for the command. This pathname should be used when creating the widgets to be used in the message portion of the widget.
Name: state Class: State Command-Line Switch: -state
This option is inherited from the Tk Button widget. By changing this option the state of all the buttons is changed. See the Tk Button widget for more details.
Name: title Class: Title Command-Line Switch: -title
-
The option specifies the title that appears on the window.
DESCRIPTION
This widget creates a toplevel window with 0 or more buttons and a message portion. The buttons appear horizontally along the bottom of the widget and if there is a message it is placed above the buttons.
The best way to describe this widget is that it is a pop-up window much like those in other windowing systems.
WIDGET COMMAND
The gk_choice command creates a new Tcl command whose name is pathname. This command may be used to invoke various operations on the widget. It has the following general form:
-
pathname option ?arg arg ...?
Option and the args determine the exact behavior of the command. The following commands are possible for gk_choice widgets:
- pathname cget option
-
Returns the current value of the configuration option given by option. Option may have any of the values accepted by the gk_choice command.
- pathname configure ?option? ?value option value ...?
-
Query or modify the configuration options of the widget. If no option is specified, returns a list describing all of the available options for pathname (see Tk_ConfigureInfo for information on the format of this list). If option is specified with no value, then the command returns a list describing the one named option (this list will be identical to the corresponding sublist of the value returned if no option is specified). If one or more option-value pairs are specified, then the command modifies the given widget option(s) to have the given value(s); in this case the command returns an empty string. Option may have any of the values accepted by the gk_choice command.
- pathname components
-
Returns a list of compnent widgets. In particular the list returned is the pathnames of all the buttons that appear at the bottom of the widget. The pathname for the leftmost button corresponds to the 0 index of this list and the rightmost button is the last entry in the list.
- pathname flash
-
This command causes all of the buttons to flash. See the Tk Button widget for more details on the flash command.
- pathname invoke
-
This causes the commands to be invoked for each of the buttons. See the Tk Button widget for more details on the flash command.
- The Buttons have the default button bindings - see Tk Button widget
DEFAULT BINDINGS
for more information. All of the buttons will destroy the toplevel widget when they are invoked.
NOTE
This widget is built using the GroupKit class builder; see the GroupKit User Manual for more information.
AUTHOR
Shannon Jaeger ([email protected])