home *** CD-ROM | disk | FTP | other *** search
/ InfoMagic Source Code 1993 July / THE_SOURCE_CODE_CD_ROM.iso / languages / tcl / tk3.3b1 / doc / options.n < prev    next >
Encoding:
Text File  |  1993-04-01  |  18.5 KB  |  580 lines

  1. '\"
  2. '\" Copyright (c) 1990 The Regents of the University of California.
  3. '\" All rights reserved.
  4. '\"
  5. '\" Permission is hereby granted, without written agreement and without
  6. '\" license or royalty fees, to use, copy, modify, and distribute this
  7. '\" documentation for any purpose, provided that the above copyright
  8. '\" notice and the following two paragraphs appear in all copies.
  9. '\"
  10. '\" IN NO EVENT SHALL THE UNIVERSITY OF CALIFORNIA BE LIABLE TO ANY PARTY
  11. '\" FOR DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES
  12. '\" ARISING OUT OF THE USE OF THIS DOCUMENTATION, EVEN IF THE UNIVERSITY OF
  13. '\" CALIFORNIA HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  14. '\"
  15. '\" THE UNIVERSITY OF CALIFORNIA SPECIFICALLY DISCLAIMS ANY WARRANTIES,
  16. '\" INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
  17. '\" AND FITNESS FOR A PARTICULAR PURPOSE.  THE SOFTWARE PROVIDED HEREUNDER IS
  18. '\" ON AN "AS IS" BASIS, AND THE UNIVERSITY OF CALIFORNIA HAS NO OBLIGATION TO
  19. '\" PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
  20. '\" 
  21. '\" $Header: /user6/ouster/wish/man/RCS/options.n,v 1.14 93/04/01 09:52:49 ouster Exp $ SPRITE (Berkeley)
  22. '/" 
  23. .so man.macros
  24. .HS options tk
  25. .BS
  26. '\" Note:  do not modify the .SH NAME line immediately below!
  27. .SH NAME
  28. options \- Standard options supported by widgets
  29. .BE
  30.  
  31. .SH DESCRIPTION
  32. This manual entry describes the common configuration options supported
  33. by widgets in the Tk toolkit.  Every widget does not necessarily support
  34. every option (see the manual entries for individual widgets for a list
  35. of the standard options supported by that widget), but if a widget does
  36. support an option with one of the names listed below, then the option
  37. has exactly the effect described below.
  38. .PP
  39. In the descriptions below,
  40. ``Name'' refers to the option's name in the option database (e.g.
  41. in .Xdefaults files).  ``Class'' refers to the option's class value
  42. in the option database.  ``Command-Line Switch'' refers to the
  43. switch used in widget-creation and \fBconfigure\fR widget commands to
  44. set this value.  For example, if an option's command-line switch is
  45. \fB\-foreground\fR and there exists a widget \fB.a.b.c\fR, then the
  46. command
  47. .DS
  48. \&\fB.a.b.c\0\0configure\0\0\-foreground black\fR
  49. .DE
  50. may be used to specify the value \fBblack\fR for the option in the
  51. the widget \fB.a.b.c\fR.  Command-line switches may be abbreviated,
  52. as long as the abbreviation is unambiguous.
  53. .ta 4c
  54. .LP
  55. .nf
  56. Name:    \fBactiveBackground\fR
  57. Class:    \fBForeground\fR
  58. Command-Line Switch:    \fB\-activebackground\fR
  59. .fi
  60. .IP
  61. Specifies background color to use when drawing active elements.
  62. An element (a widget or portion of a widget) is active if the
  63. mouse cursor is positioned over the element and pressing a mouse button
  64. will cause some action to occur.
  65. .LP
  66. .nf
  67. Name:    \fBactiveBorderWidth\fR
  68. Class:    \fBBorderWidth\fR
  69. Command-Line Switch:    \fB\-activeborderwidth\fR
  70. .fi
  71. .IP
  72. Specifies a non-negative value indicating
  73. the width of the 3-D border drawn around active elements.  See above for
  74. definition of active elements.
  75. .VS
  76. The value may have any of the forms acceptable to \fBTk_GetPixels\fR.
  77. .VE
  78. This option is typically only available in widgets displaying more
  79. than one element at a time (e.g. menus but not buttons).
  80. .LP
  81. .nf
  82. Name:    \fBactiveForeground\fR
  83. Class:    \fBBackground\fR
  84. Command-Line Switch:    \fB\-activeforeground\fR
  85. .fi
  86. .IP
  87. Specifies foreground color to use when drawing active elements.
  88. See above for definition of active elements.
  89. .LP
  90. .nf
  91. .VS
  92. Name:    \fBanchor\fR
  93. Class:    \fBAnchor\fR
  94. Command-Line Switch:    \fB\-anchor\fR
  95. .fi
  96. .IP
  97. Specifies how the information in a widget (e.g. text or a bitmap)
  98. is to be displayed in the widget.
  99. Must be one of the values \fBn\fR, \fBne\fR, \fBe\fR, \fBse\fR,
  100. \fBs\fR, \fBsw\fR, \fBw\fR, \fBnw\fR, or \fBcenter\fR.
  101. For example, \fBnw\fR means display the information such that its
  102. top-left corner is at the top-left corner of the widget.
  103. .VE
  104. .LP
  105. .nf
  106. Name:    \fBbackground\fR
  107. Class:    \fBBackground\fR
  108. Command-Line Switch:    \fB\-background or \-bg\fR
  109. .fi
  110. .IP
  111. Specifies the normal background color to use when displaying the
  112. widget.
  113. .LP
  114. .nf
  115. Name:    \fBbitmap\fR
  116. .VS
  117. Class:    \fBBitmap\fR
  118. Command-Line Switch:    \fB\-bitmap\fR
  119. .fi
  120. .IP
  121. Specifies a bitmap to display in the widget, in any of the forms
  122. acceptable to \fBTk_GetBitmap\fR.
  123. The exact way in which the bitmap is displayed may be affected by
  124. other options such as \fBanchor\fR or \fBjustify\fR.
  125. Typically, if this option is specified then it overrides other
  126. options that specify a textual value to display in the widget;
  127. the \fBbitmap\fR option may be reset to an empty string to re-enable
  128. a text display.
  129. .VE
  130. .LP
  131. .nf
  132. Name:    \fBborderWidth\fR
  133. Class:    \fBBorderWidth\fR
  134. Command-Line Switch:    \fB\-borderwidth or \-bd\fR
  135. .fi
  136. .IP
  137. Specifies a non-negative value indicating the width
  138. of the 3-D border to draw around the outside of the widget (if such a
  139. border is being drawn;  the \fBrelief\fR option typically determines
  140. this).  The value may also be used when drawing 3-D effects in the
  141. interior of the widget.
  142. .VS
  143. The value may have any of the forms acceptable to \fBTk_GetPixels\fR.
  144. .VE
  145. .LP
  146. .nf
  147. Name:    \fBcursor\fR
  148. Class:    \fBCursor\fR
  149. Command-Line Switch:    \fB\-cursor\fR
  150. .fi
  151. .IP
  152. Specifies the mouse cursor to be used for the widget.
  153. The value may have any of the forms acceptable to \fBTk_GetCursor\fR.
  154. .LP
  155. .nf
  156. Name:    \fBcursorBackground\fR
  157. Class:    \fBForeground\fR
  158. Command-Line Switch:    \fB\-cursorbackground\fR
  159. .fi
  160. .IP
  161. Specifies the color to use as background in the area covered by the
  162. insertion cursor.  This color will normally override either the normal
  163. background for the widget (or the selection background if the insertion
  164. cursor happens to fall in the selection).
  165. .VS
  166. \fIThis option is obsolete and is gradually being replaced by
  167. the \fBinsertBackground\fR option.\fR
  168. .VE
  169. .LP
  170. .nf
  171. Name:    \fBcursorBorderWidth\fR
  172. Class:    \fBBorderWidth\fR
  173. Command-Line Switch:    \fB\-cursorborderwidth\fR
  174. .fi
  175. .IP
  176. Specifies a non-negative value indicating the width
  177. of the 3-D border to draw around the insertion cursor.
  178. .VS
  179. The value may have any of the forms acceptable to \fBTk_GetPixels\fR.
  180. \fIThis option is obsolete and is gradually being replaced by
  181. the \fBinsertBorderWidth\fR option.\fR
  182. .VE
  183. .LP
  184. .nf
  185. Name:    \fBcursorOffTime\fR
  186. Class:    \fBOffTime\fR
  187. Command-Line Switch:    \fB\-cursorofftime\fR
  188. .fi
  189. .IP
  190. Specifies a non-negative integer value indicating the number of
  191. milliseconds the cursor should remain ``off'' in each blink cycle.
  192. If this option is zero then the cursor doesn't blink:  it is on
  193. all the time.
  194. .VS
  195. \fIThis option is obsolete and is gradually being replaced by
  196. the \fBinsertOffTime\fR option.\fR
  197. .VE
  198. .LP
  199. .nf
  200. Name:    \fBcursorOnTime\fR
  201. Class:    \fBOnTime\fR
  202. Command-Line Switch:    \fB\-cursorontime\fR
  203. .fi
  204. .IP
  205. Specifies a non-negative integer value indicating the number of
  206. milliseconds the cursor should remain ``on'' in each blink cycle.
  207. .VS
  208. \fIThis option is obsolete and is gradually being replaced by
  209. the \fBinsertOnTime\fR option.\fR
  210. .VE
  211. .LP
  212. .nf
  213. Name:    \fBcursorWidth\fR
  214. Class:    \fBCursorWidth\fR
  215. Command-Line Switch:    \fB\-cursorwidth\fR
  216. .fi
  217. .IP
  218. Specifies a  value indicating the total width of the insertion cursor.
  219. .VS
  220. The value may have any of the forms acceptable to \fBTk_GetPixels\fR.
  221. .VE
  222. If a border has been specified for
  223. the cursor (using the \fBcursorBorderWidth\fR option), the border
  224. will be drawn inside the width specified by the \fBcursorWidth\fR
  225. option.
  226. .VS
  227. \fIThis option is obsolete and is gradually being replaced by
  228. the \fBinsertWidth\fR option.\fR
  229. .VE
  230. .LP
  231. .nf
  232. .VS
  233. Name:    \fBdisabledForeground\fR
  234. Class:    \fBDisabledForeground\fR
  235. Command-Line Switch:    \fB\-disabledforeground\fR
  236. .fi
  237. .IP
  238. Specifies foreground color to use when drawing a disabled element.
  239. If the option is specified as an empty string (which is typically the
  240. case on monochrome displays), disabled elements are drawn with the
  241. normal fooreground color but they are dimmed by drawing them
  242. with a stippled fill pattern.
  243. .VE
  244. .LP
  245. .nf
  246. .VS
  247. Name:    \fBexportSelection\fR
  248. Class:    \fBExportSelection\fR
  249. Command-Line Switch:    \fB\-exportselection\fR
  250. .fi
  251. .IP
  252. Specifies whether or not a selection in the widget should also be
  253. the X selection.
  254. The value may have any of the forms accepted by \fBTcl_GetBoolean\fR,
  255. such as \fBtrue\fR, \fBfalse\fR, \fB0\fR, \fB1\fR, \fByes\fR, or \fBno\fR.
  256. If the selection is exported, then selecting in the widget deselects
  257. the current X selection, selecting outside the widget deselects any
  258. widget selection, and the widget will respond to selection retrieval
  259. requests when it has a selection.  The default is usually for widgets
  260. to export selections.
  261. .VE
  262. .LP
  263. .nf
  264. Name:    \fBfont\fR
  265. Class:    \fBFont\fR
  266. Command-Line Switch:    \fB\-font\fR
  267. .fi
  268. .IP
  269. Specifies the font to use when drawing text inside the widget.
  270. .LP
  271. .nf
  272. Name:    \fBforeground\fR
  273. Class:    \fBForeground\fR
  274. Command-Line Switch:    \fB\-foreground or \-fg\fR
  275. .fi
  276. .IP
  277. Specifies the normal foreground color to use when displaying the widget.
  278. .LP
  279. .nf
  280. Name:    \fBgeometry\fR
  281. Class:    \fBGeometry\fR
  282. Command-Line Switch:    \fB\-geometry\fR
  283. .fi
  284. .IP
  285. Specifies the desired geometry for the widget's window, in the
  286. form \fIwidth\fBx\fIheight\fR, where \fIwidth\fR is the desired
  287. width of the window and \fIheight\fR is the desired height.  The
  288. units for \fIwidth\fR and \fIheight\fR depend on the particular
  289. widget.  For widgets displaying text the units are usually the
  290. size of the characters in the font being displayed;  for other
  291. widgets the units are usually pixels.
  292. .LP
  293. .nf
  294. .VS
  295. Name:    \fBinsertBackground\fR
  296. Class:    \fBForeground\fR
  297. Command-Line Switch:    \fB\-insertbackground\fR
  298. .fi
  299. .IP
  300. Specifies the color to use as background in the area covered by the
  301. insertion cursor.  This color will normally override either the normal
  302. background for the widget (or the selection background if the insertion
  303. cursor happens to fall in the selection).
  304. .LP
  305. .nf
  306. Name:    \fBinsertBorderWidth\fR
  307. Class:    \fBBorderWidth\fR
  308. Command-Line Switch:    \fB\-insertborderwidth\fR
  309. .fi
  310. .IP
  311. Specifies a non-negative value indicating the width
  312. of the 3-D border to draw around the insertion cursor.
  313. The value may have any of the forms acceptable to \fBTk_GetPixels\fR.
  314. .LP
  315. .nf
  316. Name:    \fBinsertOffTime\fR
  317. Class:    \fBOffTime\fR
  318. Command-Line Switch:    \fB\-insertofftime\fR
  319. .fi
  320. .IP
  321. Specifies a non-negative integer value indicating the number of
  322. milliseconds the insertion cursor should remain ``off'' in each blink cycle.
  323. If this option is zero then the cursor doesn't blink:  it is on
  324. all the time.
  325. .LP
  326. .nf
  327. Name:    \fBinsertOnTime\fR
  328. Class:    \fBOnTime\fR
  329. Command-Line Switch:    \fB\-insertontime\fR
  330. .fi
  331. .IP
  332. Specifies a non-negative integer value indicating the number of
  333. milliseconds the insertion cursor should remain ``on'' in each blink cycle.
  334. .LP
  335. .nf
  336. Name:    \fBinsertWidth\fR
  337. Class:    \fBInsertWidth\fR
  338. Command-Line Switch:    \fB\-insertwidth\fR
  339. .fi
  340. .IP
  341. Specifies a  value indicating the total width of the insertion cursor.
  342. The value may have any of the forms acceptable to \fBTk_GetPixels\fR.
  343. If a border has been specified for the insertion
  344. cursor (using the \fBinsertBorderWidth\fR option), the border
  345. will be drawn inside the width specified by the \fBinsertWidth\fR
  346. option.
  347. .VE
  348. .LP
  349. .nf
  350. Name:    \fBorient\fR
  351. Class:    \fBOrient\fR
  352. Command-Line Switch:    \fB\-orient\fR
  353. .fi
  354. .IP
  355. For widgets that can lay themselves out with either a horizontal
  356. or vertical orientation, such as scrollbars, this option specifies
  357. which orientation should be used.  Must be either \fBhorizontal\fR
  358. or \fBvertical\fR or an abbreviation of one of these.
  359. .LP
  360. .nf
  361. Name:    \fBpadX\fR
  362. Class:    \fBPad\fR
  363. Command-Line Switch:    \fB\-padx\fR
  364. .fi
  365. .IP
  366. Specifies a non-negative value indicating how much extra space
  367. to request for the widget in the X-direction.
  368. .VS
  369. The value may have any of the forms acceptable to \fBTk_GetPixels\fR.
  370. .VE
  371. When computing how large a window it needs, the widget will
  372. add this amount to the width it would normally need (as determined
  373. by the width of the things displayed in the widget);  if the geometry
  374. manager can satisfy this request, the widget will end up with extra
  375. internal space to the left and/or right of what it displays inside.
  376. .LP
  377. .nf
  378. Name:    \fBpadY\fR
  379. Class:    \fBPad\fR
  380. Command-Line Switch:    \fB\-pady\fR
  381. .fi
  382. .IP
  383. Specifies a non-negative value indicating how much extra space
  384. to request for the widget in the Y-direction.
  385. .VS
  386. The value may have any of the forms acceptable to \fBTk_GetPixels\fR.
  387. .VE
  388. When computing how large a window it needs, the widget will add
  389. this amount to the height it would normally need (as determined by
  390. the height of the things displayed in the widget);  if the geometry
  391. manager can satisfy this request, the widget will end up with extra
  392. internal space above and/or below what it displays inside.
  393. .LP
  394. .nf
  395. Name:    \fBrelief\fR
  396. Class:    \fBRelief\fR
  397. Command-Line Switch:    \fB\-relief\fR
  398. .fi
  399. .IP
  400. Specifies the 3-D effect desired for the widget.  Acceptable
  401. values are \fBraised\fR, \fBsunken\fR, and \fBflat\fR.  The value
  402. indicates how the interior of the widget should appear relative
  403. to its exterior;  for example, \fBraised\fR means the interior of
  404. the widget should appear to protrude from the screen, relative to
  405. the exterior of the widget.
  406. .LP
  407. .nf
  408. Name:    \fBrepeatDelay\fR
  409. Class:    \fBRepeatDelay\fR
  410. Command-Line Switch:    \fB\-repeatdelay\fR
  411. .fi
  412. .IP
  413. Specifies the number of milliseconds a button or key must be held
  414. down before it begins to auto-repeat.  Used, for example, on the
  415. up- and down-arrows in scrollbars.
  416. .LP
  417. .nf
  418. Name:    \fBrepeatInterval\fR
  419. Class:    \fBRepeatInterval\fR
  420. Command-Line Switch:    \fB\-repeatinterval\fR
  421. .fi
  422. .IP
  423. Used in conjunction with \fBrepeatDelay\fR:  once auto-repeat
  424. begins, this option determines the number of milliseconds between
  425. auto-repeats.
  426. .LP
  427. .nf
  428. Name:    \fBscrollCommand\fR
  429. Class:    \fBScrollCommand\fR
  430. Command-Line Switch:    \fB\-scrollcommand\fR
  431. .fi
  432. .IP
  433. Specifies the prefix for a command used to communicate with scrollbar
  434. widgets.  When the view in the widget's window changes (or
  435. whenever anything else occurs that could change the display in a
  436. scrollbar, such as a change in the total size of the widget's
  437. contents), the widget will
  438. generate a Tcl command by concatenating the scroll command and four
  439. numbers.  The four numbers are, in order:  the total size of the
  440. widget's contents, in unspecified units
  441. (``unit'' is a widget-specific term;  for widgets
  442. displaying text, the unit is a line);  the maximum number of units that
  443. may be displayed at once in the widget's window, given its current size;  the
  444. index of the top-most or left-most unit currently visible in the window
  445. (index 0 corresponds to the first unit); and the index of the bottom-most
  446. or right-most unit currently visible in the window.  This command is
  447. then passed to the Tcl interpreter for execution.  Typically the
  448. \fBscrollCommand\fR option consists of the path name of a scrollbar
  449. widget followed by ``set'', e.g. ``.x.scrollbar set'':  this will cause
  450. the scrollbar to be updated whenever the view in the window changes.
  451. If this option is not specified, then no command will be executed.
  452. .IP
  453. .VS
  454. The \fBscrollCommand\fR option is used for widgets that support scrolling
  455. in only one direction.
  456. For widgets that support scrolling in both directions, this
  457. option is replaced with the \fBxScrollCommand\fR and \fByScrollCommand\fR
  458. options.
  459. .VE
  460. .LP
  461. .nf
  462. Name:    \fBselectBackground\fR
  463. Class:    \fBForeground\fR
  464. Command-Line Switch:    \fB\-selectbackground\fR
  465. .fi
  466. .IP
  467. Specifies the background color to use when displaying selected
  468. items.
  469. .LP
  470. .nf
  471. Name:    \fBselectBorderWidth\fR
  472. Class:    \fBBorderWidth\fR
  473. Command-Line Switch:    \fB\-selectborderwidth\fR
  474. .fi
  475. .IP
  476. Specifies a non-negative value indicating the width
  477. of the 3-D border to draw around selected items.
  478. .VS
  479. The value may have any of the forms acceptable to \fBTk_GetPixels\fR.
  480. .VE
  481. .LP
  482. .nf
  483. Name:    \fBselectForeground\fR
  484. Class:    \fBBackground\fR
  485. Command-Line Switch:    \fB\-selectforeground\fR
  486. .fi
  487. .IP
  488. Specifies the foreground color to use when displaying selected
  489. items.
  490. .LP
  491. .nf
  492. .VS
  493. Name:    \fBsetGrid\fR
  494. Class:    \fBSetGrid\fR
  495. Command-Line Switch:    \fB\-setgrid\fR
  496. .fi
  497. .IP
  498. Specifies a boolean value that determines whether this widget controls the
  499. resizing grid for its top-level window.
  500. This option is typically used in text widgets, where the information
  501. in the widget has a natural size (the size of a character) and it makes
  502. sense for the window's dimensions to be integral numbers of these units.
  503. These natural window sizes form a grid.
  504. If the \fBsetGrid\fR option is set to true then the widget will
  505. communicate with the window manager so that when the user interactively
  506. resizes the top-level window that contains the widget, the dimensions of
  507. the window will be displayed to the user in grid units and the window
  508. size will be constrained to integral numbers of grid units.
  509. See the section GRIDDED GEOMETRY MANAGEMENT in the \fBwm\fR manual
  510. entry for more details.
  511. .VE
  512. .LP
  513. .nf
  514. Name:    \fBtext\fR
  515. Class:    \fBText\fR
  516. Command-Line Switch:    \fB\-text\fR
  517. .fi
  518. .IP
  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. .LP
  523. .nf
  524. .VS
  525. Name:    \fBtextVariable\fR
  526. Class:    \fBVariable\fR
  527. Command-Line Switch:    \fB\-textvariable\fR
  528. .fi
  529. .IP
  530. Specifies the name of a variable.  The value of the variable is a text
  531. string to be displayed inside the widget;  if the variable value changes
  532. then the widget will automatically update itself to reflect the new value.
  533. The way in which the string is displayed in the widget depends on the
  534. particular widget and may be determined by other options, such as
  535. \fBanchor\fR or \fBjustify\fR.
  536. .LP
  537. .nf
  538. Name:    \fBunderline\fR
  539. Class:    \fBUnderline\fR
  540. Command-Line Switch:    \fB\-underline\fR
  541. .fi
  542. .IP
  543. Specifies the integer index of a character to underline in the widget.
  544. This option is typically used to indicate keyboard traversal characters
  545. in menu buttons and menu entries.  0 corresponds to the first character
  546. of the text displayed in the widget, 1 to the next character, and so
  547. on.
  548. .LP
  549. .nf
  550. Name:    \fBxScrollCommand\fR
  551. Class:    \fBScrollCommand\fR
  552. Command-Line Switch:    \fB\-xscrollcommand\fR
  553. .fi
  554. .IP
  555. Specifies the prefix for a command used to communicate with horizontal
  556. scrollbars.  This option is treated in the same way as the
  557. \fBscrollCommand\fR option, except that it is used for horizontal
  558. scrollbars associated with widgets that support both horizontal
  559. and vertical scrolling.
  560. See the description of \fBscrollCommand\fR for complete details
  561. on how this option is used.
  562. .LP
  563. .nf
  564. Name:    \fByScrollCommand\fR
  565. Class:    \fBScrollCommand\fR
  566. Command-Line Switch:    \fB\-yscrollcommand\fR
  567. .fi
  568. .IP
  569. Specifies the prefix for a command used to communicate with vertical
  570. scrollbars.  This option is treated in the same way as the
  571. \fBscrollCommand\fR option, except that it is used for vertical
  572. scrollbars associated with widgets that support both horizontal
  573. and vertical scrolling.
  574. See the description of \fBscrollCommand\fR for complete details
  575. on how this option is used.
  576. .VE
  577.  
  578. .SH KEYWORDS
  579. class, name, standard option, switch
  580.