| 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 | '\" RCS: @(#) $Id: options.n,v 1.6.8.1 2004/10/28 10:19:29 dkf Exp $ |
| 9 | '\" |
| 10 | '\" The definitions below are for supplemental macros used in Tcl/Tk |
| 11 | '\" manual entries. |
| 12 | '\" |
| 13 | '\" .AP type name in/out ?indent? |
| 14 | '\" Start paragraph describing an argument to a library procedure. |
| 15 | '\" type is type of argument (int, etc.), in/out is either "in", "out", |
| 16 | '\" or "in/out" to describe whether procedure reads or modifies arg, |
| 17 | '\" and indent is equivalent to second arg of .IP (shouldn't ever be |
| 18 | '\" needed; use .AS below instead) |
| 19 | '\" |
| 20 | '\" .AS ?type? ?name? |
| 21 | '\" Give maximum sizes of arguments for setting tab stops. Type and |
| 22 | '\" name are examples of largest possible arguments that will be passed |
| 23 | '\" to .AP later. If args are omitted, default tab stops are used. |
| 24 | '\" |
| 25 | '\" .BS |
| 26 | '\" Start box enclosure. From here until next .BE, everything will be |
| 27 | '\" enclosed in one large box. |
| 28 | '\" |
| 29 | '\" .BE |
| 30 | '\" End of box enclosure. |
| 31 | '\" |
| 32 | '\" .CS |
| 33 | '\" Begin code excerpt. |
| 34 | '\" |
| 35 | '\" .CE |
| 36 | '\" End code excerpt. |
| 37 | '\" |
| 38 | '\" .VS ?version? ?br? |
| 39 | '\" Begin vertical sidebar, for use in marking newly-changed parts |
| 40 | '\" of man pages. The first argument is ignored and used for recording |
| 41 | '\" the version when the .VS was added, so that the sidebars can be |
| 42 | '\" found and removed when they reach a certain age. If another argument |
| 43 | '\" is present, then a line break is forced before starting the sidebar. |
| 44 | '\" |
| 45 | '\" .VE |
| 46 | '\" End of vertical sidebar. |
| 47 | '\" |
| 48 | '\" .DS |
| 49 | '\" Begin an indented unfilled display. |
| 50 | '\" |
| 51 | '\" .DE |
| 52 | '\" End of indented unfilled display. |
| 53 | '\" |
| 54 | '\" .SO |
| 55 | '\" Start of list of standard options for a Tk widget. The |
| 56 | '\" options follow on successive lines, in four columns separated |
| 57 | '\" by tabs. |
| 58 | '\" |
| 59 | '\" .SE |
| 60 | '\" End of list of standard options for a Tk widget. |
| 61 | '\" |
| 62 | '\" .OP cmdName dbName dbClass |
| 63 | '\" Start of description of a specific option. cmdName gives the |
| 64 | '\" option's name as specified in the class command, dbName gives |
| 65 | '\" the option's name in the option database, and dbClass gives |
| 66 | '\" the option's class in the option database. |
| 67 | '\" |
| 68 | '\" .UL arg1 arg2 |
| 69 | '\" Print arg1 underlined, then print arg2 normally. |
| 70 | '\" |
| 71 | '\" RCS: @(#) $Id: man.macros,v 1.4 2000/08/25 06:18:32 ericm Exp $ |
| 72 | '\" |
| 73 | '\" # Set up traps and other miscellaneous stuff for Tcl/Tk man pages. |
| 74 | .if t .wh -1.3i ^B |
| 75 | .nr ^l \n(.l |
| 76 | .ad b |
| 77 | '\" # Start an argument description |
| 78 | .de AP |
| 79 | .ie !"\\$4"" .TP \\$4 |
| 80 | .el \{\ |
| 81 | . ie !"\\$2"" .TP \\n()Cu |
| 82 | . el .TP 15 |
| 83 | .\} |
| 84 | .ta \\n()Au \\n()Bu |
| 85 | .ie !"\\$3"" \{\ |
| 86 | \&\\$1 \\fI\\$2\\fP (\\$3) |
| 87 | .\".b |
| 88 | .\} |
| 89 | .el \{\ |
| 90 | .br |
| 91 | .ie !"\\$2"" \{\ |
| 92 | \&\\$1 \\fI\\$2\\fP |
| 93 | .\} |
| 94 | .el \{\ |
| 95 | \&\\fI\\$1\\fP |
| 96 | .\} |
| 97 | .\} |
| 98 | .. |
| 99 | '\" # define tabbing values for .AP |
| 100 | .de AS |
| 101 | .nr )A 10n |
| 102 | .if !"\\$1"" .nr )A \\w'\\$1'u+3n |
| 103 | .nr )B \\n()Au+15n |
| 104 | .\" |
| 105 | .if !"\\$2"" .nr )B \\w'\\$2'u+\\n()Au+3n |
| 106 | .nr )C \\n()Bu+\\w'(in/out)'u+2n |
| 107 | .. |
| 108 | .AS Tcl_Interp Tcl_CreateInterp in/out |
| 109 | '\" # BS - start boxed text |
| 110 | '\" # ^y = starting y location |
| 111 | '\" # ^b = 1 |
| 112 | .de BS |
| 113 | .br |
| 114 | .mk ^y |
| 115 | .nr ^b 1u |
| 116 | .if n .nf |
| 117 | .if n .ti 0 |
| 118 | .if n \l'\\n(.lu\(ul' |
| 119 | .if n .fi |
| 120 | .. |
| 121 | '\" # BE - end boxed text (draw box now) |
| 122 | .de BE |
| 123 | .nf |
| 124 | .ti 0 |
| 125 | .mk ^t |
| 126 | .ie n \l'\\n(^lu\(ul' |
| 127 | .el \{\ |
| 128 | .\" Draw four-sided box normally, but don't draw top of |
| 129 | .\" box if the box started on an earlier page. |
| 130 | .ie !\\n(^b-1 \{\ |
| 131 | \h'-1.5n'\L'|\\n(^yu-1v'\l'\\n(^lu+3n\(ul'\L'\\n(^tu+1v-\\n(^yu'\l'|0u-1.5n\(ul' |
| 132 | .\} |
| 133 | .el \}\ |
| 134 | \h'-1.5n'\L'|\\n(^yu-1v'\h'\\n(^lu+3n'\L'\\n(^tu+1v-\\n(^yu'\l'|0u-1.5n\(ul' |
| 135 | .\} |
| 136 | .\} |
| 137 | .fi |
| 138 | .br |
| 139 | .nr ^b 0 |
| 140 | .. |
| 141 | '\" # VS - start vertical sidebar |
| 142 | '\" # ^Y = starting y location |
| 143 | '\" # ^v = 1 (for troff; for nroff this doesn't matter) |
| 144 | .de VS |
| 145 | .if !"\\$2"" .br |
| 146 | .mk ^Y |
| 147 | .ie n 'mc \s12\(br\s0 |
| 148 | .el .nr ^v 1u |
| 149 | .. |
| 150 | '\" # VE - end of vertical sidebar |
| 151 | .de VE |
| 152 | .ie n 'mc |
| 153 | .el \{\ |
| 154 | .ev 2 |
| 155 | .nf |
| 156 | .ti 0 |
| 157 | .mk ^t |
| 158 | \h'|\\n(^lu+3n'\L'|\\n(^Yu-1v\(bv'\v'\\n(^tu+1v-\\n(^Yu'\h'-|\\n(^lu+3n' |
| 159 | .sp -1 |
| 160 | .fi |
| 161 | .ev |
| 162 | .\} |
| 163 | .nr ^v 0 |
| 164 | .. |
| 165 | '\" # Special macro to handle page bottom: finish off current |
| 166 | '\" # box/sidebar if in box/sidebar mode, then invoked standard |
| 167 | '\" # page bottom macro. |
| 168 | .de ^B |
| 169 | .ev 2 |
| 170 | 'ti 0 |
| 171 | 'nf |
| 172 | .mk ^t |
| 173 | .if \\n(^b \{\ |
| 174 | .\" Draw three-sided box if this is the box's first page, |
| 175 | .\" draw two sides but no top otherwise. |
| 176 | .ie !\\n(^b-1 \h'-1.5n'\L'|\\n(^yu-1v'\l'\\n(^lu+3n\(ul'\L'\\n(^tu+1v-\\n(^yu'\h'|0u'\c |
| 177 | .el \h'-1.5n'\L'|\\n(^yu-1v'\h'\\n(^lu+3n'\L'\\n(^tu+1v-\\n(^yu'\h'|0u'\c |
| 178 | .\} |
| 179 | .if \\n(^v \{\ |
| 180 | .nr ^x \\n(^tu+1v-\\n(^Yu |
| 181 | \kx\h'-\\nxu'\h'|\\n(^lu+3n'\ky\L'-\\n(^xu'\v'\\n(^xu'\h'|0u'\c |
| 182 | .\} |
| 183 | .bp |
| 184 | 'fi |
| 185 | .ev |
| 186 | .if \\n(^b \{\ |
| 187 | .mk ^y |
| 188 | .nr ^b 2 |
| 189 | .\} |
| 190 | .if \\n(^v \{\ |
| 191 | .mk ^Y |
| 192 | .\} |
| 193 | .. |
| 194 | '\" # DS - begin display |
| 195 | .de DS |
| 196 | .RS |
| 197 | .nf |
| 198 | .sp |
| 199 | .. |
| 200 | '\" # DE - end display |
| 201 | .de DE |
| 202 | .fi |
| 203 | .RE |
| 204 | .sp |
| 205 | .. |
| 206 | '\" # SO - start of list of standard options |
| 207 | .de SO |
| 208 | .SH "STANDARD OPTIONS" |
| 209 | .LP |
| 210 | .nf |
| 211 | .ta 5.5c 11c |
| 212 | .ft B |
| 213 | .. |
| 214 | '\" # SE - end of list of standard options |
| 215 | .de SE |
| 216 | .fi |
| 217 | .ft R |
| 218 | .LP |
| 219 | See the \\fBoptions\\fR manual entry for details on the standard options. |
| 220 | .. |
| 221 | '\" # OP - start of full description for a single option |
| 222 | .de OP |
| 223 | .LP |
| 224 | .nf |
| 225 | .ta 4c |
| 226 | Command-Line Name: \\fB\\$1\\fR |
| 227 | Database Name: \\fB\\$2\\fR |
| 228 | Database Class: \\fB\\$3\\fR |
| 229 | .fi |
| 230 | .IP |
| 231 | .. |
| 232 | '\" # CS - begin code excerpt |
| 233 | .de CS |
| 234 | .RS |
| 235 | .nf |
| 236 | .ta .25i .5i .75i 1i |
| 237 | .. |
| 238 | '\" # CE - end code excerpt |
| 239 | .de CE |
| 240 | .fi |
| 241 | .RE |
| 242 | .. |
| 243 | .de UL |
| 244 | \\$1\l'|0\(ul'\\$2 |
| 245 | .. |
| 246 | .TH options n 4.4 Tk "Tk Built-In Commands" |
| 247 | .BS |
| 248 | '\" Note: do not modify the .SH NAME line immediately below! |
| 249 | .SH NAME |
| 250 | options \- Standard options supported by widgets |
| 251 | .BE |
| 252 | |
| 253 | .SH DESCRIPTION |
| 254 | This manual entry describes the common configuration options supported |
| 255 | by widgets in the Tk toolkit. Every widget does not necessarily support |
| 256 | every option (see the manual entries for individual widgets for a list |
| 257 | of the standard options supported by that widget), but if a widget does |
| 258 | support an option with one of the names listed below, then the option |
| 259 | has exactly the effect described below. |
| 260 | .PP |
| 261 | In the descriptions below, ``Command-Line Name'' refers to the |
| 262 | switch used in class commands and \fBconfigure\fR widget commands to |
| 263 | set this value. For example, if an option's command-line switch is |
| 264 | \fB\-foreground\fR and there exists a widget \fB.a.b.c\fR, then the |
| 265 | command |
| 266 | .CS |
| 267 | \&\fB.a.b.c\0\0configure\0\0\-foreground black\fR |
| 268 | .CE |
| 269 | may be used to specify the value \fBblack\fR for the option in |
| 270 | the widget \fB.a.b.c\fR. Command-line switches may be abbreviated, |
| 271 | as long as the abbreviation is unambiguous. |
| 272 | ``Database Name'' refers to the option's name in the option database (e.g. |
| 273 | in .Xdefaults files). ``Database Class'' refers to the option's class value |
| 274 | in the option database. |
| 275 | .OP \-activebackground activeBackground Foreground |
| 276 | Specifies background color to use when drawing active elements. |
| 277 | An element (a widget or portion of a widget) is active if the |
| 278 | mouse cursor is positioned over the element and pressing a mouse button |
| 279 | will cause some action to occur. |
| 280 | If strict Motif compliance has been requested by setting the |
| 281 | \fBtk_strictMotif\fR variable, this option will normally be |
| 282 | ignored; the normal background color will be used instead. |
| 283 | .VS |
| 284 | For some elements on Windows and Macintosh systems, the active color |
| 285 | will only be used while mouse button 1 is pressed over the element. |
| 286 | .VE |
| 287 | .OP \-activeborderwidth activeBorderWidth BorderWidth |
| 288 | Specifies a non-negative value indicating |
| 289 | the width of the 3-D border drawn around active elements. See above for |
| 290 | definition of active elements. |
| 291 | The value may have any of the forms acceptable to \fBTk_GetPixels\fR. |
| 292 | This option is typically only available in widgets displaying more |
| 293 | than one element at a time (e.g. menus but not buttons). |
| 294 | .OP \-activeforeground activeForeground Background |
| 295 | Specifies foreground color to use when drawing active elements. |
| 296 | See above for definition of active elements. |
| 297 | .OP \-anchor anchor Anchor |
| 298 | Specifies how the information in a widget (e.g. text or a bitmap) |
| 299 | is to be displayed in the widget. |
| 300 | Must be one of the values \fBn\fR, \fBne\fR, \fBe\fR, \fBse\fR, |
| 301 | \fBs\fR, \fBsw\fR, \fBw\fR, \fBnw\fR, or \fBcenter\fR. |
| 302 | For example, \fBnw\fR means display the information such that its |
| 303 | top-left corner is at the top-left corner of the widget. |
| 304 | .OP "\-background or \-bg" background Background |
| 305 | Specifies the normal background color to use when displaying the |
| 306 | widget. |
| 307 | .OP \-bitmap bitmap Bitmap |
| 308 | Specifies a bitmap to display in the widget, in any of the forms |
| 309 | acceptable to \fBTk_GetBitmap\fR. |
| 310 | The exact way in which the bitmap is displayed may be affected by |
| 311 | other options such as \fBanchor\fR or \fBjustify\fR. |
| 312 | Typically, if this option is specified then it overrides other |
| 313 | options that specify a textual value to display in the widget |
| 314 | but this is controlled by the \fBcompound\fR option; |
| 315 | the \fBbitmap\fR option may be reset to an empty string to re-enable |
| 316 | a text display. |
| 317 | In widgets that support both \fBbitmap\fR and \fBimage\fR options, |
| 318 | \fBimage\fR will usually override \fBbitmap\fR. |
| 319 | .OP "\-borderwidth or \-bd" borderWidth BorderWidth |
| 320 | Specifies a non-negative value indicating the width |
| 321 | of the 3-D border to draw around the outside of the widget (if such a |
| 322 | border is being drawn; the \fBrelief\fR option typically determines |
| 323 | this). The value may also be used when drawing 3-D effects in the |
| 324 | interior of the widget. |
| 325 | The value may have any of the forms acceptable to \fBTk_GetPixels\fR. |
| 326 | .OP \-cursor cursor Cursor |
| 327 | Specifies the mouse cursor to be used for the widget. |
| 328 | The value may have any of the forms acceptable to \fBTk_GetCursor\fR. |
| 329 | .OP \-compound compound Compound |
| 330 | .VS 8.4 |
| 331 | Specifies if the widget should display text and bitmaps/images at the |
| 332 | same time, and if so, where the bitmap/image should be placed relative |
| 333 | to the text. Must be one of the values \fBnone\fR, \fBbottom\fR, |
| 334 | \fBtop\fR, \fBleft\fR, \fBright\fR, or \fBcenter\fR. For example, the |
| 335 | (default) value \fBnone\fR specifies that the bitmap or image should |
| 336 | (if defined) be displayed instead of the text, the value \fBleft\fR |
| 337 | specifies that the bitmap or image should be displayed to the left of |
| 338 | the text, and the value \fBcenter\fR specifies that the bitmap or |
| 339 | image should be displayed on top of the text. |
| 340 | .VE 8.4 |
| 341 | .OP \-disabledforeground disabledForeground DisabledForeground |
| 342 | Specifies foreground color to use when drawing a disabled element. |
| 343 | If the option is specified as an empty string (which is typically the |
| 344 | case on monochrome displays), disabled elements are drawn with the |
| 345 | normal foreground color but they are dimmed by drawing them |
| 346 | with a stippled fill pattern. |
| 347 | .OP \-exportselection exportSelection ExportSelection |
| 348 | Specifies whether or not a selection in the widget should also be |
| 349 | the X selection. |
| 350 | The value may have any of the forms accepted by \fBTcl_GetBoolean\fR, |
| 351 | such as \fBtrue\fR, \fBfalse\fR, \fB0\fR, \fB1\fR, \fByes\fR, or \fBno\fR. |
| 352 | If the selection is exported, then selecting in the widget deselects |
| 353 | the current X selection, selecting outside the widget deselects any |
| 354 | widget selection, and the widget will respond to selection retrieval |
| 355 | requests when it has a selection. The default is usually for widgets |
| 356 | to export selections. |
| 357 | .OP \-font font Font |
| 358 | Specifies the font to use when drawing text inside the widget. |
| 359 | The value may have any of the forms accepted by \fBTk_GetFont\fR. |
| 360 | .OP "\-foreground or \-fg" foreground Foreground |
| 361 | Specifies the normal foreground color to use when displaying the widget. |
| 362 | .OP \-highlightbackground highlightBackground HighlightBackground |
| 363 | Specifies the color to display in the traversal highlight region when |
| 364 | the widget does not have the input focus. |
| 365 | .OP \-highlightcolor highlightColor HighlightColor |
| 366 | Specifies the color to use for the traversal highlight rectangle that is |
| 367 | drawn around the widget when it has the input focus. |
| 368 | .OP \-highlightthickness highlightThickness HighlightThickness |
| 369 | Specifies a non-negative value indicating the width of the highlight |
| 370 | rectangle to draw around the outside of the widget when it has the |
| 371 | input focus. |
| 372 | The value may have any of the forms acceptable to \fBTk_GetPixels\fR. |
| 373 | If the value is zero, no focus highlight is drawn around the widget. |
| 374 | .OP \-image image Image |
| 375 | Specifies an image to display in the widget, which must have been |
| 376 | created with the \fBimage create\fR command. |
| 377 | Typically, if the \fBimage\fR option is specified then it overrides other |
| 378 | options that specify a bitmap or textual value to display in the |
| 379 | widget, though this is controlled by the \fBcompound\fR option; |
| 380 | the \fBimage\fR option may be reset to an empty string to re-enable |
| 381 | a bitmap or text display. |
| 382 | .OP \-insertbackground insertBackground Foreground |
| 383 | Specifies the color to use as background in the area covered by the |
| 384 | insertion cursor. This color will normally override either the normal |
| 385 | background for the widget (or the selection background if the insertion |
| 386 | cursor happens to fall in the selection). |
| 387 | .OP \-insertborderwidth insertBorderWidth BorderWidth |
| 388 | Specifies a non-negative value indicating the width |
| 389 | of the 3-D border to draw around the insertion cursor. |
| 390 | The value may have any of the forms acceptable to \fBTk_GetPixels\fR. |
| 391 | .OP \-insertofftime insertOffTime OffTime |
| 392 | Specifies a non-negative integer value indicating the number of |
| 393 | milliseconds the insertion cursor should remain ``off'' in each blink cycle. |
| 394 | If this option is zero then the cursor doesn't blink: it is on |
| 395 | all the time. |
| 396 | .OP \-insertontime insertOnTime OnTime |
| 397 | Specifies a non-negative integer value indicating the number of |
| 398 | milliseconds the insertion cursor should remain ``on'' in each blink cycle. |
| 399 | .OP \-insertwidth insertWidth InsertWidth |
| 400 | Specifies a value indicating the total width of the insertion cursor. |
| 401 | The value may have any of the forms acceptable to \fBTk_GetPixels\fR. |
| 402 | If a border has been specified for the insertion |
| 403 | cursor (using the \fBinsertBorderWidth\fR option), the border |
| 404 | will be drawn inside the width specified by the \fBinsertWidth\fR |
| 405 | option. |
| 406 | .OP \-jump jump Jump |
| 407 | For widgets with a slider that can be dragged to adjust a value, |
| 408 | such as scrollbars, this option determines when |
| 409 | notifications are made about changes in the value. |
| 410 | The option's value must be a boolean of the form accepted by |
| 411 | \fBTcl_GetBoolean\fR. |
| 412 | If the value is false, updates are made continuously as the |
| 413 | slider is dragged. |
| 414 | If the value is true, updates are delayed until the mouse button |
| 415 | is released to end the drag; at that point a single notification |
| 416 | is made (the value ``jumps'' rather than changing smoothly). |
| 417 | .OP \-justify justify Justify |
| 418 | When there are multiple lines of text displayed in a widget, this |
| 419 | option determines how the lines line up with each other. |
| 420 | Must be one of \fBleft\fR, \fBcenter\fR, or \fBright\fR. |
| 421 | \fBLeft\fR means that the lines' left edges all line up, \fBcenter\fR |
| 422 | means that the lines' centers are aligned, and \fBright\fR means |
| 423 | that the lines' right edges line up. |
| 424 | .OP \-orient orient Orient |
| 425 | For widgets that can lay themselves out with either a horizontal |
| 426 | or vertical orientation, such as scrollbars, this option specifies |
| 427 | which orientation should be used. Must be either \fBhorizontal\fR |
| 428 | or \fBvertical\fR or an abbreviation of one of these. |
| 429 | .OP \-padx padX Pad |
| 430 | Specifies a non-negative value indicating how much extra space |
| 431 | to request for the widget in the X-direction. |
| 432 | The value may have any of the forms acceptable to \fBTk_GetPixels\fR. |
| 433 | When computing how large a window it needs, the widget will |
| 434 | add this amount to the width it would normally need (as determined |
| 435 | by the width of the things displayed in the widget); if the geometry |
| 436 | manager can satisfy this request, the widget will end up with extra |
| 437 | internal space to the left and/or right of what it displays inside. |
| 438 | Most widgets only use this option for padding text: if they are |
| 439 | displaying a bitmap or image, then they usually ignore padding |
| 440 | options. |
| 441 | .OP \-pady padY Pad |
| 442 | Specifies a non-negative value indicating how much extra space |
| 443 | to request for the widget in the Y-direction. |
| 444 | The value may have any of the forms acceptable to \fBTk_GetPixels\fR. |
| 445 | When computing how large a window it needs, the widget will add |
| 446 | this amount to the height it would normally need (as determined by |
| 447 | the height of the things displayed in the widget); if the geometry |
| 448 | manager can satisfy this request, the widget will end up with extra |
| 449 | internal space above and/or below what it displays inside. |
| 450 | Most widgets only use this option for padding text: if they are |
| 451 | displaying a bitmap or image, then they usually ignore padding |
| 452 | options. |
| 453 | .OP \-relief relief Relief |
| 454 | Specifies the 3-D effect desired for the widget. Acceptable |
| 455 | values are \fBraised\fR, \fBsunken\fR, \fBflat\fR, \fBridge\fR, |
| 456 | \fBsolid\fR, and \fBgroove\fR. |
| 457 | The value |
| 458 | indicates how the interior of the widget should appear relative |
| 459 | to its exterior; for example, \fBraised\fR means the interior of |
| 460 | the widget should appear to protrude from the screen, relative to |
| 461 | the exterior of the widget. |
| 462 | .OP \-repeatdelay repeatDelay RepeatDelay |
| 463 | Specifies the number of milliseconds a button or key must be held |
| 464 | down before it begins to auto-repeat. Used, for example, on the |
| 465 | up- and down-arrows in scrollbars. |
| 466 | .OP \-repeatinterval repeatInterval RepeatInterval |
| 467 | Used in conjunction with \fBrepeatDelay\fR: once auto-repeat |
| 468 | begins, this option determines the number of milliseconds between |
| 469 | auto-repeats. |
| 470 | .OP \-selectbackground selectBackground Foreground |
| 471 | Specifies the background color to use when displaying selected |
| 472 | items. |
| 473 | .OP \-selectborderwidth selectBorderWidth BorderWidth |
| 474 | Specifies a non-negative value indicating the width |
| 475 | of the 3-D border to draw around selected items. |
| 476 | The value may have any of the forms acceptable to \fBTk_GetPixels\fR. |
| 477 | .OP \-selectforeground selectForeground Background |
| 478 | Specifies the foreground color to use when displaying selected |
| 479 | items. |
| 480 | .OP \-setgrid setGrid SetGrid |
| 481 | Specifies a boolean value that determines whether this widget controls the |
| 482 | resizing grid for its top-level window. |
| 483 | This option is typically used in text widgets, where the information |
| 484 | in the widget has a natural size (the size of a character) and it makes |
| 485 | sense for the window's dimensions to be integral numbers of these units. |
| 486 | These natural window sizes form a grid. |
| 487 | If the \fBsetGrid\fR option is set to true then the widget will |
| 488 | communicate with the window manager so that when the user interactively |
| 489 | resizes the top-level window that contains the widget, the dimensions of |
| 490 | the window will be displayed to the user in grid units and the window |
| 491 | size will be constrained to integral numbers of grid units. |
| 492 | See the section \fBGRIDDED GEOMETRY MANAGEMENT\fR in the \fBwm\fR manual |
| 493 | entry for more details. |
| 494 | .OP \-takefocus takeFocus TakeFocus |
| 495 | Determines whether the window accepts the focus during keyboard |
| 496 | traversal (e.g., Tab and Shift-Tab). |
| 497 | Before setting the focus to a window, the traversal scripts |
| 498 | consult the value of the \fBtakeFocus\fR option. |
| 499 | A value of \fB0\fR means that the window should be skipped entirely |
| 500 | during keyboard traversal. |
| 501 | \fB1\fR means that the window should receive the input |
| 502 | focus as long as it is viewable (it and all of its ancestors are mapped). |
| 503 | An empty value for the option means that the traversal scripts make |
| 504 | the decision about whether or not to focus on the window: the current |
| 505 | algorithm is to skip the window if it is |
| 506 | disabled, if it has no key bindings, or if it is not viewable. |
| 507 | If the value has any other form, then the traversal scripts take |
| 508 | the value, append the name of the window to it (with a separator space), |
| 509 | and evaluate the resulting string as a Tcl script. |
| 510 | The script must return \fB0\fR, \fB1\fR, or an empty string: a |
| 511 | \fB0\fR or \fB1\fR value specifies whether the window will receive |
| 512 | the input focus, and an empty string results in the default decision |
| 513 | described above. |
| 514 | Note: this interpretation of the option is defined entirely by |
| 515 | the Tcl scripts that implement traversal: the widget implementations |
| 516 | ignore the option entirely, so you can change its meaning if you |
| 517 | redefine the keyboard traversal scripts. |
| 518 | .OP \-text text Text |
| 519 | Specifies a string to be displayed inside the widget. The way in which |
| 520 | the string is displayed depends on the particular widget and may be |
| 521 | determined by other options, such as \fBanchor\fR or \fBjustify\fR. |
| 522 | .OP \-textvariable textVariable Variable |
| 523 | Specifies the name of a variable. The value of the variable is a text |
| 524 | string to be displayed inside the widget; if the variable value changes |
| 525 | then the widget will automatically update itself to reflect the new value. |
| 526 | The way in which the string is displayed in the widget depends on the |
| 527 | particular widget and may be determined by other options, such as |
| 528 | \fBanchor\fR or \fBjustify\fR. |
| 529 | .OP \-troughcolor troughColor Background |
| 530 | Specifies the color to use for the rectangular trough areas |
| 531 | in widgets such as scrollbars and scales. This option is ignored for |
| 532 | scrollbars on Windows (native widget doesn't recognize this option). |
| 533 | .OP \-underline underline Underline |
| 534 | Specifies the integer index of a character to underline in the widget. |
| 535 | This option is used by the default bindings to implement keyboard |
| 536 | traversal for menu buttons and menu entries. |
| 537 | 0 corresponds to the first character of the text displayed in the |
| 538 | widget, 1 to the next character, and so on. |
| 539 | .OP \-wraplength wrapLength WrapLength |
| 540 | For widgets that can perform word-wrapping, this option specifies |
| 541 | the maximum line length. |
| 542 | Lines that would exceed this length are wrapped onto the next line, |
| 543 | so that no line is longer than the specified length. |
| 544 | The value may be specified in any of the standard forms for |
| 545 | screen distances. |
| 546 | If this value is less than or equal to 0 then no wrapping is done: lines |
| 547 | will break only at newline characters in the text. |
| 548 | .OP \-xscrollcommand xScrollCommand ScrollCommand |
| 549 | Specifies the prefix for a command used to communicate with horizontal |
| 550 | scrollbars. |
| 551 | When the view in the widget's window changes (or |
| 552 | whenever anything else occurs that could change the display in a |
| 553 | scrollbar, such as a change in the total size of the widget's |
| 554 | contents), the widget will |
| 555 | generate a Tcl command by concatenating the scroll command and |
| 556 | two numbers. |
| 557 | Each of the numbers is a fraction between 0 and 1, which indicates |
| 558 | a position in the document. 0 indicates the beginning of the document, |
| 559 | 1 indicates the end, .333 indicates a position one third the way through |
| 560 | the document, and so on. |
| 561 | The first fraction indicates the first information in the document |
| 562 | that is visible in the window, and the second fraction indicates |
| 563 | the information just after the last portion that is visible. |
| 564 | The command is |
| 565 | then passed to the Tcl interpreter for execution. Typically the |
| 566 | \fBxScrollCommand\fR option consists of the path name of a scrollbar |
| 567 | widget followed by ``set'', e.g. ``.x.scrollbar set'': this will cause |
| 568 | the scrollbar to be updated whenever the view in the window changes. |
| 569 | If this option is not specified, then no command will be executed. |
| 570 | .OP \-yscrollcommand yScrollCommand ScrollCommand |
| 571 | Specifies the prefix for a command used to communicate with vertical |
| 572 | scrollbars. This option is treated in the same way as the |
| 573 | \fBxScrollCommand\fR option, except that it is used for vertical |
| 574 | scrollbars and is provided by widgets that support vertical scrolling. |
| 575 | See the description of \fBxScrollCommand\fR for details |
| 576 | on how this option is used. |
| 577 | |
| 578 | .SH "SEE ALSO" |
| 579 | colors, cursors, font |
| 580 | |
| 581 | .SH KEYWORDS |
| 582 | class, name, standard option, switch |