OpenCores
URL https://opencores.org/ocsvn/or1k_old/or1k_old/trunk

Subversion Repositories or1k_old

[/] [or1k_old/] [trunk/] [insight/] [tk/] [doc/] [options.n] - Blame information for rev 1782

Details | Compare with Previous | View Log

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

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.