NAME
options - Standard options supported by widgets
DESCRIPTION
This manual entry describes the common configuration options supported
by widgets in the Tk toolkit. Every widget does not necessarily sup-
port every option (see the manual entries for individual widgets for alist of the standard options supported by that widget), but if a widget
does support an option with one of the names listed below, then the option has exactly the effect described below.In the descriptions below, ``Command-Line Name'' refers to the switch
used in class commands and ccoonnffiigguurree widget commands to set this value.For example, if an option's command-line switch is -ffoorreeggrroouunndd and
there exists a widget ..aa..bb..cc, then the command..aa..bb..cc ccoonnffiigguurree -ffoorreeggrroouunndd bbllaacckk
may be used to specify the value bbllaacckk for the option in the the widget..aa..bb..cc. Command-line switches may be abbreviated, as long as the
abbreviation is unambiguous. ``Database Name'' refers to the option's name in the option database (e.g. in .Xdefaults files). ``Database Class'' refers to the option's class value in the option database.Command-Line Name:-aaccttiivveebbaacckkggrroouunndd
Database Name: aaccttiivveeBBaacckkggrroouunndd Database Class: FFoorreeggrroouunndd Specifies background color to use when drawing active elements. An element (a widget or portion of a widget) is active if the mouse cursor is positioned over the element and pressing a mousebutton will cause some action to occur. If strict Motif compli-
ance has been requested by setting the ttkkssttrriiccttMMoottiiff variable, this option will normally be ignored; the normal background color will be used instead. For some elements on Windows and | Macintosh systems, the active color will only be used while | mouse button 1 is pressed over the element.Command-Line Name:-aaccttiivveebboorrddeerrwwiiddtthh
Database Name: aaccttiivveeBBoorrddeerrWWiiddtthh Database Class: BBoorrddeerrWWiiddtthhSpecifies a non-negative value indicating the width of the 3-D
border drawn around active elements. See above for definitionof active elements. The value may have any of the forms accept-
able to TTkkGGeettPPiixxeellss. This option is typically only available in widgets displaying more than one element at a time (e.g. menus but not buttons).Command-Line Name:-aaccttiivveeffoorreeggrroouunndd
Database Name: aaccttiivveeFFoorreeggrroouunndd Database Class: BBaacckkggrroouunndd Specifies foreground color to use when drawing active elements. See above for definition of active elements.Command-Line Name:-aanncchhoorr
Database Name: aanncchhoorr Database Class: AAnncchhoorrSpecifies how the information in a widget (e.g. text or a bit-
map) is to be displayed in the widget. Must be one of the val-
ues nn, nnee, ee, ssee, ss, ssww, ww, nnww, or cceenntteerr. For example, nnwwmeans display the information such that its top-left corner is
at the top-left corner of the widget.
Command-Line Name:-bbaacckkggrroouunndd oorr -bbgg
Database Name: bbaacckkggrroouunndd Database Class: BBaacckkggrroouunndd Specifies the normal background color to use when displaying the widget.Command-Line Name:-bbiittmmaapp
Database Name: bbiittmmaapp Database Class: BBiittmmaapp Specifies a bitmap to display in the widget, in any of the forms acceptable to TTkkGGeettBBiittmmaapp. The exact way in which the bitmapis displayed may be affected by other options such as aanncchhoorr or
jjuussttiiffyy. Typically, if this option is specified then it over-
rides other options that specify a textual value to display in
the widget; the bbiittmmaapp option may be reset to an empty string tore-enable a text display. In widgets that support both bbiittmmaapp
and iimmaaggee options, iimmaaggee will usually override bbiittmmaapp.
Command-Line Name:-bboorrddeerrwwiiddtthh oorr -bbdd
Database Name: bboorrddeerrWWiiddtthh Database Class: BBoorrddeerrWWiiddtthhSpecifies a non-negative value indicating the width of the 3-D
border to draw around the outside of the widget (if such a bor-
der is being drawn; the rreelliieeff option typically determinesthis). The value may also be used when drawing 3-D effects in
the interior of the widget. The value may have any of the forms acceptable to TTkkGGeettPPiixxeellss.Command-Line Name:-ccuurrssoorr
Database Name: ccuurrssoorr Database Class: CCuurrssoorr Specifies the mouse cursor to be used for the widget. The value may have any of the forms acceptable to TTkkGGeettCCuurrssoorr.Command-Line Name:-ddiissaabblleeddffoorreeggrroouunndd
Database Name: ddiissaabblleeddFFoorreeggrroouunndd Database Class: DDiissaabblleeddFFoorreeggrroouunnddSpecifies foreground color to use when drawing a disabled ele-
ment. If the option is specified as an empty string (which is typically the case on monochrome displays), disabled elements are drawn with the normal foreground color but they are dimmed by drawing them with a stippled fill pattern.Command-Line Name:-eexxppoorrttsseelleeccttiioonn
Database Name: eexxppoorrttSSeelleeccttiioonn Database Class: EExxppoorrttSSeelleeccttiioonn Specifies whether or not a selection in the widget should also be the X selection. The value may have any of the forms accepted by TTccllGGeettBBoooolleeaann, such as ttrruuee, ffaallssee, 00, 11, yyeess, or nnoo. If the selection is exported, then selecting in the widget deselects the current X selection, selecting outside the widget deselects any widget selection, and the widget will respond to selection retrieval requests when it has a selection. The default is usually for widgets to export selections.Command-Line Name:-ffoonntt
Database Name: ffoonntt Database Class: FFoonntt Specifies the font to use when drawing text inside the widget. The value may have any of the forms accepted by TTkkGGeettFFoonntt.Command-Line Name:-ffoorreeggrroouunndd oorr -ffgg
Database Name: ffoorreeggrroouunndd Database Class: FFoorreeggrroouunndd Specifies the normal foreground color to use when displaying the widget.Command-Line Name:-hhiigghhlliigghhttbbaacckkggrroouunndd
Database Name: hhiigghhlliigghhttBBaacckkggrroouunndd Database Class: HHiigghhlliigghhttBBaacckkggrroouunndd Specifies the color to display in the traversal highlight region when the widget does not have the input focus.Command-Line Name:-hhiigghhlliigghhttccoolloorr
Database Name: hhiigghhlliigghhttCCoolloorr Database Class: HHiigghhlliigghhttCCoolloorr Specifies the color to use for the traversal highlight rectangle that is drawn around the widget when it has the input focus.Command-Line Name:-hhiigghhlliigghhtttthhiicckknneessss
Database Name: hhiigghhlliigghhttTThhiicckknneessss Database Class: HHiigghhlliigghhttTThhiicckknneessssSpecifies a non-negative value indicating the width of the high-
light rectangle to draw around the outside of the widget when it has the input focus. The value may have any of the forms acceptable to TTkkGGeettPPiixxeellss. If the value is zero, no focus highlight is drawn around the widget.Command-Line Name:-iimmaaggee
Database Name: iimmaaggee Database Class: IImmaaggee Specifies an image to display in the widget, which must have been created with the iimmaaggee ccrreeaattee command. Typically, if theiimmaaggee option is specified then it overrides other options that
specify a bitmap or textual value to display in the widget; theiimmaaggee option may be reset to an empty string to re-enable a bit-
map or text display.Command-Line Name:-iinnsseerrttbbaacckkggrroouunndd
Database Name: iinnsseerrttBBaacckkggrroouunndd Database Class: FFoorreeggrroouunndd Specifies the color to use as background in the area covered by the insertion cursor. This color will normally override eitherthe normal background for the widget (or the selection back-
ground if the insertion cursor happens to fall in the selec-
tion).Command-Line Name:-iinnsseerrttbboorrddeerrwwiiddtthh
Database Name: iinnsseerrttBBoorrddeerrWWiiddtthh Database Class: BBoorrddeerrWWiiddtthhSpecifies a non-negative value indicating the width of the 3-D
border to draw around the insertion cursor. The value may have any of the forms acceptable to TTkkGGeettPPiixxeellss.Command-Line Name:-iinnsseerrttooffffttiimmee
Database Name: iinnsseerrttOOffffTTiimmee Database Class: OOffffTTiimmeeSpecifies a non-negative integer value indicating the number of
milliseconds the insertion cursor should remain ``off'' in each blink cycle. If this option is zero then the cursor doesn't blink: it is on all the time.Command-Line Name:-iinnsseerrttoonnttiimmee
Database Name: iinnsseerrttOOnnTTiimmee Database Class: OOnnTTiimmeeSpecifies a non-negative integer value indicating the number of
milliseconds the insertion cursor should remain ``on'' in each blink cycle.Command-Line Name:-iinnsseerrttwwiiddtthh
Database Name: iinnsseerrttWWiiddtthh Database Class: IInnsseerrttWWiiddtthh Specifies a value indicating the total width of the insertion cursor. The value may have any of the forms acceptable to TTkkGGeettPPiixxeellss. If a border has been specified for the insertion cursor (using the iinnsseerrttBBoorrddeerrWWiiddtthh option), the border will be drawn inside the width specified by the iinnsseerrttWWiiddtthh option.Command-Line Name:-jjuummpp
Database Name: jjuummpp Database Class: JJuummpp For widgets with a slider that can be dragged to adjust a value, such as scrollbars, this option determines when notifications are made about changes in the value. The option's value must be a boolean of the form accepted by TTccllGGeettBBoooolleeaann. If the value is false, updates are made continuously as the slider is dragged. If the value is true, updates are delayed until themouse button is released to end the drag; at that point a sin-
gle notification is made (the value ``jumps'' rather than chang-
ing smoothly).Command-Line Name:-jjuussttiiffyy
Database Name: jjuussttiiffyy Database Class: JJuussttiiffyy When there are multiple lines of text displayed in a widget, this option determines how the lines line up with each other. Must be one of lleefftt, cceenntteerr, or rriigghhtt. LLeefftt means that thelines' left edges all line up, cceenntteerr means that the lines' cen-
ters are aligned, and rriigghhtt means that the lines' right edges line up.Command-Line Name:-oorriieenntt
Database Name: oorriieenntt Database Class: OOrriieenntt For widgets that can lay themselves out with either a horizontalor vertical orientation, such as scrollbars, this option speci-
fies which orientation should be used. Must be either hhoorriizzoonn-
ttaall or vveerrttiiccaall or an abbreviation of one of these.Command-Line Name:-ppaaddxx
Database Name: ppaaddXX Database Class: PPaaddSpecifies a non-negative value indicating how much extra space
to request for the widget in the X-direction. The value may
have any of the forms acceptable to TTkkGGeettPPiixxeellss. When comput-
ing how large a window it needs, the widget will add this amount to the width it would normally need (as determined by the width of the things displayed in the widget); if the geometry manager can satisfy this request, the widget will end up with extra internal space to the left and/or right of what it displays inside. Most widgets only use this option for padding text: if they are displaying a bitmap or image, then they usually ignorepadding options.
Command-Line Name:-ppaaddyy
Database Name: ppaaddYY Database Class: PPaaddSpecifies a non-negative value indicating how much extra space
to request for the widget in the Y-direction. The value may
have any of the forms acceptable to TTkkGGeettPPiixxeellss. When comput-
ing how large a window it needs, the widget will add this amount to the height it would normally need (as determined by the height of the things displayed in the widget); if the geometry manager can satisfy this request, the widget will end up with extra internal space above and/or below what it displays inside. Most widgets only use this option for padding text: if they are displaying a bitmap or image, then they usually ignore paddingoptions.
Command-Line Name:-rreelliieeff
Database Name: rreelliieeff Database Class: RReelliieeffSpecifies the 3-D effect desired for the widget. Acceptable
values are rraaiisseedd, ssuunnkkeenn, ffllaatt, rriiddggee, ssoolliidd, and ggrroooovvee. The value indicates how the interior of the widget should appearrelative to its exterior; for example, rraaiisseedd means the inte-
rior of the widget should appear to protrude from the screen, relative to the exterior of the widget.Command-Line Name:-rreeppeeaattddeellaayy
Database Name: rreeppeeaattDDeellaayy Database Class: RReeppeeaattDDeellaayy Specifies the number of milliseconds a button or key must beheld down before it begins to auto-repeat. Used, for example,
on the up- and down-arrows in scrollbars.
Command-Line Name:-rreeppeeaattiinntteerrvvaall
Database Name: rreeppeeaattIInntteerrvvaall Database Class: RReeppeeaattIInntteerrvvaallUsed in conjunction with rreeppeeaattDDeellaayy: once auto-repeat begins,
this option determines the number of milliseconds between auto-
repeats.Command-Line Name:-sseelleeccttbbaacckkggrroouunndd
Database Name: sseelleeccttBBaacckkggrroouunndd Database Class: FFoorreeggrroouunndd Specifies the background color to use when displaying selected items.Command-Line Name:-sseelleeccttbboorrddeerrwwiiddtthh
Database Name: sseelleeccttBBoorrddeerrWWiiddtthh Database Class: BBoorrddeerrWWiiddtthhSpecifies a non-negative value indicating the width of the 3-D
border to draw around selected items. The value may have any of the forms acceptable to TTkkGGeettPPiixxeellss.Command-Line Name:-sseelleeccttffoorreeggrroouunndd
Database Name: sseelleeccttFFoorreeggrroouunndd Database Class: BBaacckkggrroouunndd Specifies the foreground color to use when displaying selected items.Command-Line Name:-sseettggrriidd
Database Name: sseettGGrriidd Database Class: SSeettGGrriidd Specifies a boolean value that determines whether this widgetcontrols the resizing grid for its top-level window. This
option is typically used in text widgets, where the information in the widget has a natural size (the size of a character) andit makes sense for the window's dimensions to be integral num-
bers of these units. These natural window sizes form a grid.If the sseettGGrriidd option is set to true then the widget will commu-
nicate with the window manager so that when the user interac-
tively resizes the top-level window that contains the widget,
the dimensions of the window will be displayed to the user in grid units and the window size will be constrained to integralnumbers of grid units. See the section GRIDDED GEOMETRY MANAGE-
MENT in the wwmm manual entry for more details.Command-Line Name:-ttaakkeeffooccuuss
Database Name: ttaakkeeFFooccuuss Database Class: TTaakkeeFFooccuuss Determines whether the window accepts the focus during keyboardtraversal (e.g., Tab and Shift-Tab). Before setting the focus
to a window, the traversal scripts consult the value of the ttaakkeeFFooccuuss option. A value of 00 means that the window should be skipped entirely during keyboard traversal. 11 means that the window should receive the input focus as long as it is viewable (it and all of its ancestors are mapped). An empty value for the option means that the traversal scripts make the decisionabout whether or not to focus on the window: the current algo-
rithm is to skip the window if it is disabled, if it has no key bindings, or if it is not viewable. If the value has any other form, then the traversal scripts take the value, append the name of the window to it (with a separator space), and evaluate the resulting string as a Tcl script. The script must return 00, 11, or an empty string: a 00 or 11 value specifies whether the window will receive the input focus, and an empty string results in the default decision described above. Note: this interpretation of the option is defined entirely by the Tcl scripts that implement traversal: the widget implementations ignore the optionentirely, so you can change its meaning if you redefine the key-
board traversal scripts.Command-Line Name:-tteexxtt
Database Name: tteexxtt Database Class: TTeexxtt Specifies a string to be displayed inside the widget. The wayin which the string is displayed depends on the particular wid-
get and may be determined by other options, such as aanncchhoorr or
jjuussttiiffyy.Command-Line Name:-tteexxttvvaarriiaabbllee
Database Name: tteexxttVVaarriiaabbllee Database Class: VVaarriiaabbllee Specifies the name of a variable. The value of the variable isa text string to be displayed inside the widget; if the vari-
able value changes then the widget will automatically update itself to reflect the new value. The way in which the string is displayed in the widget depends on the particular widget and maybe determined by other options, such as aanncchhoorr or jjuussttiiffyy.
Command-Line Name:-ttrroouugghhccoolloorr
Database Name: ttrroouugghhCCoolloorr Database Class: BBaacckkggrroouunndd Specifies the color to use for the rectangular trough areas in widgets such as scrollbars and scales. This option is ignored for scrollbars on Windows (native widget doesn't recognize this option).Command-Line Name:-uunnddeerrlliinnee
Database Name: uunnddeerrlliinnee Database Class: UUnnddeerrlliinnee Specifies the integer index of a character to underline in thewidget. This option is used by the default bindings to imple-
ment keyboard traversal for menu buttons and menu entries. 0 corresponds to the first character of the text displayed in the widget, 1 to the next character, and so on.Command-Line Name:-wwrraapplleennggtthh
Database Name: wwrraappLLeennggtthh Database Class: WWrraappLLeennggtthhFor widgets that can perform word-wrapping, this option speci-
fies the maximum line length. Lines that would exceed this length are wrapped onto the next line, so that no line is longer than the specified length. The value may be specified in any of the standard forms for screen distances. If this value is less than or equal to 0 then no wrapping is done: lines will break only at newline characters in the text.Command-Line Name:-xxssccrroollllccoommmmaanndd
Database Name: xxSSccrroollllCCoommmmaanndd Database Class: SSccrroollllCCoommmmaannddSpecifies the prefix for a command used to communicate with hor-
izontal scrollbars. When the view in the widget's window changes (or whenever anything else occurs that could change the display in a scrollbar, such as a change in the total size of the widget's contents), the widget will generate a Tcl command by concatenating the scroll command and two numbers. Each of the numbers is a fraction between 0 and 1, which indicates aposition in the document. 0 indicates the beginning of the doc-
ument, 1 indicates the end, .333 indicates a position one third the way through the document, and so on. The first fraction indicates the first information in the document that is visible in the window, and the second fraction indicates the information just after the last portion that is visible. The command is then passed to the Tcl interpreter for execution. Typically the xxSSccrroollllCCoommmmaanndd option consists of the path name of a scrollbar widget followed by ``set'', e.g. ``.x.scrollbar set'': this will cause the scrollbar to be updated whenever the view in thewindow changes. If this option is not specified, then no com-
mand will be executed.Command-Line Name:-yyssccrroollllccoommmmaanndd
Database Name: yySSccrroollllCCoommmmaanndd Database Class: SSccrroollllCCoommmmaannddSpecifies the prefix for a command used to communicate with ver-
tical scrollbars. This option is treated in the same way as the xxSSccrroollllCCoommmmaanndd option, except that it is used for vertical scrollbars and is provided by widgets that support vertical scrolling. See the description of xxSSccrroollllCCoommmmaanndd for details on how this option is used.SEE ALSO
colors, cursors, font KKEEYYWWOORRDDSS class, name, standard option, switchTk 4.4 options(n)