OSDN Git Service

Please enter the commit message for your changes. Lines starting
[eos/base.git] / util / src / TclTk / tk8.6.12 / doc / options.n
1 '\"
2 '\" Copyright (c) 1990-1994 The Regents of the University of California.
3 '\" Copyright (c) 1994-1996 Sun Microsystems, Inc.
4 '\"
5 '\" See the file "license.terms" for information on usage and redistribution
6 '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
7 '\"
8 .TH options n 4.4 Tk "Tk Built-In Commands"
9 .so man.macros
10 .BS
11 '\" Note:  do not modify the .SH NAME line immediately below!
12 .SH NAME
13 options \- Standard options supported by widgets
14 .BE
15 .SH DESCRIPTION
16 .PP
17 This manual entry describes the common configuration options supported
18 by widgets in the Tk toolkit.  Every widget does not necessarily support
19 every option (see the manual entries for individual widgets for a list
20 of the standard options supported by that widget), but if a widget does
21 support an option with one of the names listed below, then the option
22 has exactly the effect described below.
23 .PP
24 In the descriptions below,
25 .QW "Command-Line Name"
26 refers to the
27 switch used in class commands and \fBconfigure\fR widget commands to
28 set this value.  For example, if an option's command-line switch is
29 \fB\-foreground\fR and there exists a widget \fB.a.b.c\fR, then the
30 command
31 .CS
32 \&\fB.a.b.c\0\0configure\0\0\-foreground black\fR
33 .CE
34 may be used to specify the value \fBblack\fR for the option in
35 the widget \fB.a.b.c\fR.  Command-line switches may be abbreviated,
36 as long as the abbreviation is unambiguous.
37 .QW "Database Name"
38 refers to the option's name in the option database (e.g. in .Xdefaults files).
39 .QW "Database Class"
40 refers to the option's class value in the option database.
41 .OP \-activebackground activeBackground Foreground
42 Specifies background color to use when drawing active elements.
43 An element (a widget or portion of a widget) is active if the
44 mouse cursor is positioned over the element and pressing a mouse button
45 will cause some action to occur.
46 If strict Motif compliance has been requested by setting the
47 \fBtk_strictMotif\fR variable, this option will normally be
48 ignored;  the normal background color will be used instead.
49 For some elements on Windows and Macintosh systems, the active color
50 will only be used while mouse button 1 is pressed over the element.
51 .OP \-activeborderwidth activeBorderWidth BorderWidth
52 Specifies a non-negative value indicating
53 the width of the 3-D border drawn around active elements.  See above for
54 definition of active elements.
55 The value may have any of the forms acceptable to \fBTk_GetPixels\fR.
56 This option is typically only available in widgets displaying more
57 than one element at a time (e.g. menus but not buttons).
58 .OP \-activeforeground activeForeground Background
59 Specifies foreground color to use when drawing active elements.
60 See above for definition of active elements.
61 .OP \-anchor anchor Anchor
62 Specifies how the information in a widget (e.g. text or a bitmap)
63 is to be displayed in the widget.
64 Must be one of the values \fBn\fR, \fBne\fR, \fBe\fR, \fBse\fR,
65 \fBs\fR, \fBsw\fR, \fBw\fR, \fBnw\fR, or \fBcenter\fR.
66 For example, \fBnw\fR means display the information such that its
67 top-left corner is at the top-left corner of the widget.
68 .OP "\-background or \-bg" background Background
69 Specifies the normal background color to use when displaying the
70 widget.
71 .OP \-bitmap bitmap Bitmap
72 Specifies a bitmap to display in the widget, in any of the forms
73 acceptable to \fBTk_GetBitmap\fR.
74 The exact way in which the bitmap is displayed may be affected by
75 other options such as \fB\-anchor\fR or \fB\-justify\fR.
76 Typically, if this option is specified then it overrides other
77 options that specify a textual value to display in the widget
78 but this is controlled by the \fB\-compound\fR option;
79 the \fB\-bitmap\fR option may be reset to an empty string to re-enable
80 a text display.
81 In widgets that support both \fB\-bitmap\fR and \fB\-image\fR options,
82 \fB\-image\fR will usually override \fB\-bitmap\fR.
83 .OP "\-borderwidth or \-bd" borderWidth BorderWidth
84 Specifies a non-negative value indicating the width
85 of the 3-D border to draw around the outside of the widget (if such a
86 border is being drawn;  the \fB\-relief\fR option typically determines
87 this).  The value may also be used when drawing 3-D effects in the
88 interior of the widget.
89 The value may have any of the forms acceptable to \fBTk_GetPixels\fR.
90 .OP \-cursor cursor Cursor
91 Specifies the mouse cursor to be used for the widget.
92 The value may have any of the forms acceptable to \fBTk_GetCursor\fR.
93 In addition, if an empty string is specified, it indicates that the
94 widget should defer to its parent for cursor specification.
95 .OP \-compound compound Compound
96 Specifies if the widget should display text and bitmaps/images at the
97 same time, and if so, where the bitmap/image should be placed relative
98 to the text.  Must be one of the values \fBnone\fR, \fBbottom\fR,
99 \fBtop\fR, \fBleft\fR, \fBright\fR, or \fBcenter\fR.  For example, the
100 (default) value \fBnone\fR specifies that the bitmap or image should
101 (if defined) be displayed instead of the text, the value \fBleft\fR
102 specifies that the bitmap or image should be displayed to the left of
103 the text, and the value \fBcenter\fR specifies that the bitmap or
104 image should be displayed on top of the text.
105 .OP \-disabledforeground disabledForeground DisabledForeground
106 Specifies foreground color to use when drawing a disabled element.
107 If the option is specified as an empty string (which is typically the
108 case on monochrome displays), disabled elements are drawn with the
109 normal foreground color but they are dimmed by drawing them
110 with a stippled fill pattern.
111 .OP \-exportselection exportSelection ExportSelection
112 Specifies whether or not a selection in the widget should also be
113 the X selection.
114 The value may have any of the forms accepted by \fBTcl_GetBoolean\fR,
115 such as \fBtrue\fR, \fBfalse\fR, \fB0\fR, \fB1\fR, \fByes\fR, or \fBno\fR.
116 If the selection is exported, then selecting in the widget deselects
117 the current X selection, selecting outside the widget deselects any
118 widget selection, and the widget will respond to selection retrieval
119 requests when it has a selection.  The default is usually for widgets
120 to export selections.
121 .OP \-font font Font
122 Specifies the font to use when drawing text inside the widget.
123 The value may have any of the forms described in the \fBfont\fR manual
124 page under \fBFONT DESCRIPTION\fR.
125 .OP "\-foreground or \-fg" foreground Foreground
126 Specifies the normal foreground color to use when displaying the widget.
127 .OP \-highlightbackground highlightBackground HighlightBackground
128 Specifies the color to display in the traversal highlight region when
129 the widget does not have the input focus.
130 .OP \-highlightcolor highlightColor HighlightColor
131 Specifies the color to use for the traversal highlight rectangle that is
132 drawn around the widget when it has the input focus.
133 .OP \-highlightthickness highlightThickness HighlightThickness
134 Specifies a non-negative value indicating the width of the highlight
135 rectangle to draw around the outside of the widget when it has the
136 input focus.
137 The value may have any of the forms acceptable to \fBTk_GetPixels\fR.
138 If the value is zero, no focus highlight is drawn around the widget.
139 .OP \-image image Image
140 Specifies an image to display in the widget, which must have been
141 created with the \fBimage create\fR command.
142 Typically, if the \fB\-image\fR option is specified then it overrides other
143 options that specify a bitmap or textual value to display in the
144 widget, though this is controlled by the \fB\-compound\fR option;
145 the \fB\-image\fR option may be reset to an empty string to re-enable
146 a bitmap or text display.
147 .OP \-insertbackground insertBackground Foreground
148 Specifies the color to use as background in the area covered by the
149 insertion cursor.  This color will normally override either the normal
150 background for the widget (or the selection background if the insertion
151 cursor happens to fall in the selection).
152 .OP \-insertborderwidth insertBorderWidth BorderWidth
153 Specifies a non-negative value indicating the width
154 of the 3-D border to draw around the insertion cursor.
155 The value may have any of the forms acceptable to \fBTk_GetPixels\fR.
156 .OP \-insertofftime insertOffTime OffTime
157 Specifies a non-negative integer value indicating the number of
158 milliseconds the insertion cursor should remain
159 .QW off
160 in each blink cycle.
161 If this option is zero then the cursor does not blink:  it is on
162 all the time.
163 .OP \-insertontime insertOnTime OnTime
164 Specifies a non-negative integer value indicating the number of
165 milliseconds the insertion cursor should remain
166 .QW on
167 in each blink cycle.
168 .OP \-insertwidth insertWidth InsertWidth
169 Specifies a  value indicating the total width of the insertion cursor.
170 The value may have any of the forms acceptable to \fBTk_GetPixels\fR.
171 If a border has been specified for the insertion
172 cursor (using the \fB\-insertborderwidth\fR option), the border
173 will be drawn inside the width specified by the \fB\-insertwidth\fR
174 option.
175 .OP \-jump jump Jump
176 For widgets with a slider that can be dragged to adjust a value,
177 such as scrollbars, this option determines when
178 notifications are made about changes in the value.
179 The option's value must be a boolean of the form accepted by
180 \fBTcl_GetBoolean\fR.
181 If the value is false, updates are made continuously as the
182 slider is dragged.
183 If the value is true, updates are delayed until the mouse button
184 is released to end the drag;  at that point a single notification
185 is made (the value
186 .QW jumps
187 rather than changing smoothly).
188 .OP \-justify justify Justify
189 When there are multiple lines of text displayed in a widget, this
190 option determines how the lines line up with each other.
191 Must be one of \fBleft\fR, \fBcenter\fR, or \fBright\fR.
192 \fBLeft\fR means that the lines' left edges all line up, \fBcenter\fR
193 means that the lines' centers are aligned, and \fBright\fR means
194 that the lines' right edges line up.
195 .OP \-orient orient Orient
196 For widgets that can lay themselves out with either a horizontal
197 or vertical orientation, such as scrollbars, this option specifies
198 which orientation should be used.  Must be either \fBhorizontal\fR
199 or \fBvertical\fR or an abbreviation of one of these.
200 .OP \-padx padX Pad
201 Specifies a non-negative value indicating how much extra space
202 to request for the widget in the X-direction.
203 The value may have any of the forms acceptable to \fBTk_GetPixels\fR.
204 When computing how large a window it needs, the widget will
205 add this amount to the width it would normally need (as determined
206 by the width of the things displayed in the widget);  if the geometry
207 manager can satisfy this request, the widget will end up with extra
208 internal space to the left and/or right of what it displays inside.
209 Most widgets only use this option for padding text:  if they are
210 displaying a bitmap or image, then they usually ignore padding
211 options.
212 .OP \-pady padY Pad
213 Specifies a non-negative value indicating how much extra space
214 to request for the widget in the Y-direction.
215 The value may have any of the forms acceptable to \fBTk_GetPixels\fR.
216 When computing how large a window it needs, the widget will add
217 this amount to the height it would normally need (as determined by
218 the height of the things displayed in the widget);  if the geometry
219 manager can satisfy this request, the widget will end up with extra
220 internal space above and/or below what it displays inside.
221 Most widgets only use this option for padding text:  if they are
222 displaying a bitmap or image, then they usually ignore padding
223 options.
224 .OP \-relief relief Relief
225 Specifies the 3-D effect desired for the widget.  Acceptable
226 values are \fBraised\fR, \fBsunken\fR, \fBflat\fR, \fBridge\fR,
227 \fBsolid\fR, and \fBgroove\fR.
228 The value
229 indicates how the interior of the widget should appear relative
230 to its exterior;  for example, \fBraised\fR means the interior of
231 the widget should appear to protrude from the screen, relative to
232 the exterior of the widget.
233 .OP \-repeatdelay repeatDelay RepeatDelay
234 Specifies the number of milliseconds a button or key must be held
235 down before it begins to auto-repeat.  Used, for example, on the
236 up- and down-arrows in scrollbars.
237 .OP \-repeatinterval repeatInterval RepeatInterval
238 Used in conjunction with \fB\-repeatdelay\fR:  once auto-repeat
239 begins, this option determines the number of milliseconds between
240 auto-repeats.
241 .OP \-selectbackground selectBackground Foreground
242 Specifies the background color to use when displaying selected
243 items.
244 .OP \-selectborderwidth selectBorderWidth BorderWidth
245 Specifies a non-negative value indicating the width
246 of the 3-D border to draw around selected items.
247 The value may have any of the forms acceptable to \fBTk_GetPixels\fR.
248 .OP \-selectforeground selectForeground Background
249 Specifies the foreground color to use when displaying selected
250 items.
251 .OP \-setgrid setGrid SetGrid
252 Specifies a boolean value that determines whether this widget controls the
253 resizing grid for its top-level window.
254 This option is typically used in text widgets, where the information
255 in the widget has a natural size (the size of a character) and it makes
256 sense for the window's dimensions to be integral numbers of these units.
257 These natural window sizes form a grid.
258 If the \fB\-setgrid\fR option is set to true then the widget will
259 communicate with the window manager so that when the user interactively
260 resizes the top-level window that contains the widget, the dimensions of
261 the window will be displayed to the user in grid units and the window
262 size will be constrained to integral numbers of grid units.
263 See the section \fBGRIDDED GEOMETRY MANAGEMENT\fR in the \fBwm\fR manual
264 entry for more details.
265 .OP \-takefocus takeFocus TakeFocus
266 Determines whether the window accepts the focus during keyboard
267 traversal (e.g., Tab and Shift-Tab).
268 Before setting the focus to a window, the traversal scripts
269 consult the value of the \fB\-takefocus\fR option.
270 A value of \fB0\fR means that the window should be skipped entirely
271 during keyboard traversal.
272 \fB1\fR means that the window should receive the input
273 focus as long as it is viewable (it and all of its ancestors are mapped).
274 An empty value for the option means that the traversal scripts make
275 the decision about whether or not to focus on the window:  the current
276 algorithm is to skip the window if it is
277 disabled, if it has no key bindings, or if it is not viewable.
278 If the value has any other form, then the traversal scripts take
279 the value, append the name of the window to it (with a separator space),
280 and evaluate the resulting string as a Tcl script.
281 The script must return \fB0\fR, \fB1\fR, or an empty string:  a
282 \fB0\fR or \fB1\fR value specifies whether the window will receive
283 the input focus, and an empty string results in the default decision
284 described above.
285 Note: this interpretation of the option is defined entirely by
286 the Tcl scripts that implement traversal:  the widget implementations
287 ignore the option entirely, so you can change its meaning if you
288 redefine the keyboard traversal scripts.
289 .OP \-text text Text
290 Specifies a string to be displayed inside the widget.  The way in which
291 the string is displayed depends on the particular widget and may be
292 determined by other options, such as \fB\-anchor\fR or \fB\-justify\fR.
293 .OP \-textvariable textVariable Variable
294 Specifies the name of a global variable.  The value of the variable is a text
295 string to be displayed inside the widget;  if the variable value changes
296 then the widget will automatically update itself to reflect the new value.
297 The way in which the string is displayed in the widget depends on the
298 particular widget and may be determined by other options, such as
299 \fB\-anchor\fR or \fB\-justify\fR.
300 .OP \-troughcolor troughColor Background
301 Specifies the color to use for the rectangular trough areas
302 in widgets such as scrollbars and scales.  This option is ignored for
303 scrollbars on Windows (native widget does not recognize this option).
304 .OP \-underline underline Underline
305 Specifies the integer index of a character to underline in the widget.
306 This option is used by the default bindings to implement keyboard
307 traversal for menu buttons and menu entries.
308 0 corresponds to the first character of the text displayed in the
309 widget, 1 to the next character, and so on.
310 .OP \-wraplength wrapLength WrapLength
311 For widgets that can perform word-wrapping, this option specifies
312 the maximum line length.
313 Lines that would exceed this length are wrapped onto the next line,
314 so that no line is longer than the specified length.
315 The value may be specified in any of the standard forms for
316 screen distances.
317 If this value is less than or equal to 0 then no wrapping is done:  lines
318 will break only at newline characters in the text.
319 .OP \-xscrollcommand xScrollCommand ScrollCommand
320 Specifies the prefix for a command used to communicate with horizontal
321 scrollbars.
322 When the view in the widget's window changes (or
323 whenever anything else occurs that could change the display in a
324 scrollbar, such as a change in the total size of the widget's
325 contents), the widget will
326 generate a Tcl command by concatenating the scroll command and
327 two numbers.
328 Each of the numbers is a fraction between 0 and 1, which indicates
329 a position in the document.  0 indicates the beginning of the document,
330 1 indicates the end, .333 indicates a position one third the way through
331 the document, and so on.
332 The first fraction indicates the first information in the document
333 that is visible in the window, and the second fraction indicates
334 the information just after the last portion that is visible.
335 The command is
336 then passed to the Tcl interpreter for execution.  Typically the
337 \fB\-xscrollcommand\fR option consists of the path name of a scrollbar
338 widget followed by
339 .QW set ,
340 e.g.
341 .QW ".x.scrollbar set" :
342 this will cause
343 the scrollbar to be updated whenever the view in the window changes.
344 If this option is not specified, then no command will be executed.
345 .OP \-yscrollcommand yScrollCommand ScrollCommand
346 Specifies the prefix for a command used to communicate with vertical
347 scrollbars.  This option is treated in the same way as the
348 \fB\-xscrollcommand\fR option, except that it is used for vertical
349 scrollbars and is provided by widgets that support vertical scrolling.
350 See the description of \fB\-xscrollcommand\fR for details
351 on how this option is used.
352 .SH "SEE ALSO"
353 colors, cursors, font
354 .SH KEYWORDS
355 class, name, standard option, switch
356 '\" Local Variables:
357 '\" mode: nroff
358 '\" End: