Widget
options
Widget options in SpecTcl can be configured from the widgets option
sheet. This page describes only those widget options that are different
than the options that would be used in an widget configure
command, and are therefore described in the Tk man pages.
There are cases where the name of a widget option (such as padx)
conflicts with the name of a geometry management option. In those cases,
one of the options is renamed to prevent ambiguity. Consequently, the
option name used in the actual generated Tcl code will not match the
name on the corresponding option sheet.
- align (widget)
- This option specifies alignment of text within each widget that
supports it.
- comments
- This is arbitrary text. It is not currently used for anything.
- command
- The command options permits four special substitutions to take
place. They are %B, %M, %W, and %R, which are replaced with the base
name of the widget, the name of the geometry master, the name of the
widget, and the widgets root. A %% gets changed into a single %. For
example, if this panel is instantiated in .toplevel, and the widget
is named widget, and is managed by the widget frame,
the following substitutions are made:
%B .toplevel
%M .toplevel.frame
%W .toplevel.widget
%R .toplevel
The values of %B and %R differ only when the panel is instantiated
in ".".
- font
- Fonts in SpecTcl are not entered using the X font names. Instead,
they are specified by a comma separated list of fields. The first two
fields are the font family and point size. The remaining fields consist
of zero or more of italic or bold. (eg. "times,12,bold",
"helvetica,14,bolditalic", "courier,8,")
- help
- If the help field is used, its contents are displayed as
part of the help message when the cursor is over the widget. The help
is not currently available to the application.
- item_name
- This is the name of the widget, as would be returned by
winfo name. The application code should use this name to refer
to the widget. If the interface is instantiated in a frame called '.foo',
then the widget would be .foo.item_name. Because of Tcl/Tk
limitations, this must start with a lowercase letter or number.
- padx
- pady
- Each widget can have up to three kinds of padding: internal, default,
and external.
- Internal padding forms the bounding box for the text placed
inside of widgets such as buttons or labels. With non-zero internal
padding, the justify option will anchor the text to the proper
size of this internal-padding bounding box.
- Default padding is the extra space inside the widget's border,
and outside the text inside the widget.
- External padding is the extra space outside the widget's
border that keeps the border away from the edge of the cell. External
padding only makes a difference if the widget is set to fill its cavity
(with the fill option), or if the widget is the biggest in its row
or column.
- tabbing order
- For this field, an arbitrary text string is used to alter the default
tabbing order of the widgets. By default, the order is left to right,
then top down. The values of this field are sorted alphabetically to
sort the widgets, using the default order for widgets with the same
string. All widgets with no string indicated are sorted first.
- tags
- This field contains the list of binding tags used for this widget.
If nothing is specified, the default bindtags are used.