All widget are created with
widgetpathname [ option1value1 [ option2 ... ] ]
where widget is the Tcl command corresponding to the class of
widget desired (eg. button
) and pathname is a string which
will be used to identify the newly created widget. In general,
a widget name is the concatenation of its parent`s name followed
by a period (unless the parent is the root window ``.``) and a
string containing no periods (eg. .mainframe.btnframe.btn1).
Widget configuration options may be passed in the creation
command. Options begin with a ``-`` and are always followed
by a value string. After creation, options may be changed using
pathnameconfigureoption1value1 [ option2 ... ]
and queried using the cget
Some of the widget options which multiple widgets support are described
here for brevity. For options that take screen units, values are in
pixels unless an optional one letter suffix modifier is present ---
c (cm), i (inch), m (mm), or p (points).
Background color of widget when it is active.
Width in screen units of widget border when it is active.
Foreground color of widget when it is active.
How information is positioned inside widget. Valid
anchorPos values are n, ne, e, se, s, sw, w, nw, and center.
Background color of widget in normal state (Abbrev: -bg).
Bitmap to display in the widget (error, gray12, gray25, gray50,
gray75, hourglass, info, questhead, question, warning, @
Width in screen units of widget border in normal state (Abbrev: -bd).
Tcl command to run when widget is invoked.
Cursor to display when mouse pointer is in widget.
Foreground color of widget when it is disabled.
Whether or not a selection in the widget should also
be the X selection.
Font to use when drawing text inside the widget.
Foreground color of widget in normal state (Abbrev: -fg).
Height of widget. Units depend on widget.
Color of the rectangle drawn around the widget when it does not
have the input focus.
Color of the rectangle drawn around the widget when it has the
Width in screen units of highlight rectangle drawn around widget
when it has the input focus.
Image to display in the widget (see Images).
Color to use as background in the area covered by the insertion
Width in screen units of border to draw around the insertion cursor.
Time the insertion cursor should remain ``off`` in each blink cycle.
Time the insertion cursor should remain ``on`` in each blink cycle.
Width in screen units of the insertion cursor.
Whether to notify scrollbars and scales connected
to the widget to delay updates until mouse button is released.
How multiple lines line up with each other.
Which orientation widget should use in layout.
Extra space in screen units to request for the widget in X-direction.
Extra space in screen units to request for the widget in Y-direction.
3-D effect desired for the widget`s border.
Time a button or key must be held down before it begins to
Time between auto-repeats once action has begun.
Background color to use when displaying selected items.
Width in screen units of border to draw around selected items.
Foreground color to use when displaying selected items.
Whether this widget controls the resizing grid for its
-state normaldisabled (active for button-type widgets)
Current state of widget.
If 0 or 1, signals that the widget should never or always take the focus.
If empty, Tk decides. Otherwise, evaluates argument as script with widget
name appended as argument. Returned value must be 0, 1 or empty.
Text to be displayed inside the widget.
Variable which contains a text string to be displayed inside the widget.
Color to use for the rectangular trough areas in widget.
Integer index of a character to underline in the widget.
Width of widget. Units depend on widget.
Maximum line length in screen units for word-wrapping.
Prefix for a command used to communicate with horizontal scrollbars.
Prefix for a command used to communicate with vertical scrollbars.