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

Subversion Repositories or1k

[/] [or1k/] [trunk/] [insight/] [tix/] [man/] [TixComboBox.n] - Blame information for rev 1767

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 578 markom
'\"
2
'\" Copyright (c) 1996, Expert Interface Technologies
3
'\"
4
'\" See the file "license.terms" for information on usage and redistribution
5
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
6
'\"
7
'\" The file man.macros and some of the macros used by this file are
8
'\" copyrighted: (c) 1990 The Regents of the University of California.
9
'\"              (c) 1994-1995 Sun Microsystems, Inc.
10
'\" The license terms of the Tcl/Tk distrobution are in the file
11
'\" license.tcl.
12
.so man.macros
13
'----------------------------------------------------------------------
14
.HS tixComboBox tix 4.0
15
.BS
16
'
17
'
18
'----------------------------------------------------------------------
19
.SH NAME
20
tixComboBox - Create and manipulate tixComboBox widgets
21
'
22
'
23
'
24
'----------------------------------------------------------------------
25
.PP
26
.SH SYNOPSIS
27
\fBtixComboBox\fI \fIpathName ?\fIoptions\fR?
28
'
29
'
30
'----------------------------------------------------------------------
31
.PP
32
.SH SUPER-CLASS
33
The \fBTixComboBox\fR class is derived from the \fBTixLabelWidget\fR
34
class and inherits all the commands, options and subwidgets
35
of its super-class.
36
'
37
'----------------------------------------------------------------------
38
.SH "STANDARD OPTIONS"
39
'
40
\fBTixComboBox\fR supports all the standard options of a frame widget.
41
See the options(n) manual entry for details on the standard options.
42
'
43
'
44
'----------------------------------------------------------------------
45
.PP
46
.SH "WIDGET-SPECIFIC OPTIONS"
47
'
48
'
49
'
50
'----------BEGIN
51
.LP
52
.nf
53
Name:           \fBanchor\fR
54
Class:          \fBAnchor\fR
55
Switch:         \fB\-anchor\fR
56
.fi
57
.IP
58
Specifies how the string inside the entry subwidget should be aligned.
59
Only the values "w" or "e" are allowed. When set the "w", the entry is
60
aligned to its beginning. When set to "e", it is aligned to its end.
61
'----------END
62
'
63
'----------BEGIN
64
.LP
65
.nf
66
Name:           \fBarrowBitmap\fR
67
Class:          \fBArrowBitmap\fR
68
Switch:         \fB\-arrowbitmap\fR
69
.fi
70
.IP
71
Specifies the bitmap to be used in the arrow button beside the entry
72
widget. The default is an downward arrow bitmap in the file
73
$tix_library/bitmaps/cbxarrow
74
'----------END
75
'
76
'----------BEGIN
77
.LP
78
.nf
79
Name:           \fBbrowseCmd\fR
80
Class:          \fBBrowseCmd\fR
81
Switch:         \fB\-browsecmd\fR
82
.fi
83
.IP
84
Specifies the command to be called when the user browses through the
85
listbox. This command can be used to provide instant feedback when the
86
user examines items in the listbox before committing a choice.
87
'----------END
88
'
89
'----------BEGIN
90
.LP
91
.nf
92
Name:           \fBcommand\fR
93
Class:          \fBCommand\fR
94
Switch:         \fB\-command\fR
95
.fi
96
.IP
97
Specifies the command to be called when the ComboBox is invoked
98
or when the \fB\-value\fR of the ComboBox is changed.
99
'----------END
100
'
101
'----------BEGIN
102
.LP
103
.nf
104
Name:           \fBcrossBitmap\fR
105
Class:          \fBCrossBitmap\fR
106
Switch:         \fB\-crossbitmap\fR
107
.fi
108
.IP
109
Specifies the bitmap to be used in the "cross" button to the left of
110
the entry widget. The default is a bitmap in the file
111
$tix_library/bitmaps/cross
112
'
113
'----------END
114
'
115
'----------BEGIN
116
.LP
117
.nf
118
Name:           \fBdisableCallback\fR
119
Class:          \fBDisableCallback\fR
120
Switch:         \fB\-disablecallback\fR
121
.fi
122
.IP
123
A boolean value indicating whether callbacks should be disabled. When
124
set to true, the TCL command specified by the \fB\-command\fR option
125
is not executed when the \fB\-value\fR of the ComboBox.
126
changes.
127
'----------END
128
'
129
'----------BEGIN
130
.LP
131
.nf
132
Name:           \fBdisabledforeground\fR
133
Class:          \fBDisabledForeground\fR
134
Switch:         \fB\-disabledforeground\fR
135
.fi
136
.IP
137
Specifies the foreground color to be used when the ComboBox is disabled.
138
'----------END
139
'
140
'----------BEGIN
141
.LP
142
.nf
143
Name:           \fBdropdown\fR
144
Class:          \fBDropdown\fR
145
Switch:         \fB\-dropdown\fR
146
.fi
147
.IP
148
A Boolean value specifying the style of the ComboBox. When set to
149
"true", the listbox is only displayed temporarily when the arrow
150
button is pressed. When set to "false", the listbox is always
151
displayed.
152
'
153
'----------END
154
'
155
'----------BEGIN
156
.LP
157
.nf
158
Name:           \fBeditable\fR
159
Class:          \fBEditable\fR
160
Switch:         \fB\-editable\fR
161
.fi
162
.IP
163
Specifies whether the user is allowed to type into the entry subwidget of
164
the ComboBox.
165
'----------END
166
'
167
'----------BEGIN
168
.LP
169
.nf
170
Name:           \fBfancy\fR
171
Class:          \fBFancy\fR
172
Switch:         \fB\-fancy\fR
173
.fi
174
.IP
175
A Boolean value specifying whether the cross and tick button
176
subwidgets should be shown.
177
'----------END
178
'
179
'
180
'----------BEGIN
181
.LP
182
.nf
183
Name:           \fBgrab\fR
184
Class:          \fBGrab\fR
185
Switch:         \fB\-grab\fR
186
.fi
187
.IP
188
Specifies the pointer grabbing policy when the listbox is popped up.
189
Only values "global", "local" or "none" are allowed. By default global
190
grab is used. However, when you are developing your application, you
191
may want to use only local grabbing so that in the event of errors,
192
your X display won\'t be locked up.
193
'----------END
194
'
195
'----------BEGIN
196
.LP
197
.nf
198
Name:           \fBhistoryLimit\fR
199
Class:          \fBhistoryLimit\fR
200
Switch:         \fB\-historylimit\fR
201
Alias:          \fB\-histlimit\fR
202
.fi
203
.IP
204
Specifies how many previous user inputs can be stored in the history
205
list.
206
'----------END
207
'
208
'----------BEGIN
209
.LP
210
.nf
211
Name:           \fBhistory\fR
212
Class:          \fBHistory\fR
213
Switch:         \fB\-history\fR
214
.fi
215
.IP
216
A Boolean value specifying whether previous user inputs should be
217
stored in the history list.
218
'
219
'----------END
220
'
221
'----------BEGIN
222
.LP
223
.nf
224
Name:           \fBlabel\fR
225
Class:          \fBLabel\fR
226
Switch:         \fB\-label\fR
227
.fi
228
.IP
229
Specifies the string to display as the label of this ComboBox widget.
230
'----------END
231
'
232
'----------BEGIN
233
.LP
234
.nf
235
Name:           \fBlabelSide\fR
236
Class:          \fBLabelSide\fR
237
Switch:         \fB\-labelside\fR
238
.fi
239
.IP
240
Specifies where the label should be displayed relative to the entry
241
subwidget. Valid options are: \fBtop\fR, \fBleft\fR, \fBright\fR,
242
\fBbottom\fR, \fBnone\fR or \fBacrosstop\fR.
243
'----------END
244
''
245
'----------BEGIN
246
.LP
247
.nf
248
Name:           \fBlistCmd\fR
249
Class:          \fBlistCmd\fR
250
Switch:         \fB\-listcmd\fR
251
.fi
252
.IP
253
Specifies a TCL command to be called every time when the listbox pops
254
up. This option allows you to fill up the listbox on-demand. This
255
option is ignored when the listbox is not in the \fBdropdown\fR style.
256
'----------END
257
'
258
'----------BEGIN
259
.LP
260
.nf
261
Name:           \fBlistWidth\fR
262
Class:          \fBlistWidth\fR
263
Switch:         \fB\-listwidth\fR
264
.fi
265
.IP
266
If set, this option controls the width of the listbox subwidget when
267
it is popped up. The option is ignored when the listbox is not in the
268
\fBdropdown\fR style.
269
'----------END
270
'
271
'----------BEGIN
272
.LP
273
.nf
274
Name:           \fBprunehistory\fR
275
Class:          \fBPruneHistory\fR
276
Switch:         \fB\-prunehistory\fR
277
.fi
278
.IP
279
Specifies whether duplicated previous user inputs should be pruned
280
from the the history list. Only Boolean values are allowed.
281
'----------END
282
'
283
'----------BEGIN
284
.LP
285
.nf
286
Name:           \fBselection\fR
287
Class:          \fBSelection\fR
288
Switch:         \fB\-selection\fR
289
.fi
290
.IP
291
Contains the selection in the ComboBox (the string displayed in the
292
entry subwidget). Depending on the \fB\-selectmode\fR, the selection
293
of a ComboBox may be different than its \fB\-value\fR.
294
'----------END
295
'
296
'----------BEGIN
297
.LP
298
.nf
299
Name:           \fBselection\fR
300
Class:          \fBSelection\fR
301
Switch:         \fB\-selection\fR
302
.fi
303
.IP
304
This option stores the temporary selection. When the user types in a
305
text string inside the entry widget, that string is considered as a
306
temporary input and is stored inside the \fB\-selection\fR option. The
307
\fB\-value\fR option is updated only when the user presses the return
308
key.
309
'
310
'----------BEGIN
311
.LP
312
.nf
313
Name:           \fBselectMode\fR
314
Class:          \fBSelectMode\fR
315
Switch:         \fB\-selectmode\fR
316
.fi
317
.IP
318
Specifies the how the combobox responds to the mouse button events in
319
the listbox subwidget; can eithet be \fB"browse"\fR or
320
\fB"immediate"\fR. The default \fB\-selectmode\fR is "browse". See the
321
\fBBINDINGS\fR section below.
322
'----------END
323
'----------BEGIN
324
.LP
325
.nf
326
Name:           \fBstate\fR
327
Class:          \fBState\fR
328
Switch:         \fB\-state\fR
329
.fi
330
.IP
331
Specifies the whether the ComboBox is normal or disabled.
332
Only the values "normal" and "disabled" are recognized.
333
'----------END
334
'
335
'----------BEGIN
336
.LP
337
.nf
338
Name:           \fBtickBitmap\fR
339
Class:          \fBtickBitmap\fR
340
Switch:         \fB\-tickbitmap\fR
341
.fi
342
.IP
343
Specifies the bitmap to be used in the "tick" button to the left of
344
the entry widget. The default is a bitmap in the file
345
$tix_library/bitmaps/tick
346
'----------END
347
'
348
'----------BEGIN
349
.LP
350
.nf
351
Name:           \fBvalidateCmd\fR
352
Class:          \fBValidateCmd\fR
353
Switch:         \fB\-validatecmd\fR
354
.fi
355
.IP
356
Specifies a TCL command to be called when the \fB\-value\fR of the
357
ComboBox is about to change. This command is called with one parameter
358
-- the new \fB\-value\fR entered by the user. This command is to
359
validate this new value by returning a value it deems valid.
360
'----------END
361
'
362
'----------BEGIN
363
.LP
364
.nf
365
Name:           \fBvalue\fR
366
Class:          \fBValue\fR
367
Switch:         \fB\-value\fR
368
.fi
369
.IP
370
Specifies the string to be displayed in the entry subwidget of the
371
ComboBox. When queried, the returned value is the last value
372
selected by the user. When the \fB\-value\fR option is changed as a
373
result of the \fBconfig -value\fR widget command, the TCL command
374
specified by the \fB\-command\fR option is called.
375
'----------END
376
'
377
'
378
'
379
'----------BEGIN
380
.LP
381
.nf
382
Name:           \fBvariable\fR
383
Class:          \fBVariable\fR
384
Switch:         \fB\-variable\fR
385
.fi
386
.IP
387
Specifies the global variable in which the value of the
388
ComboBox should be stored. The value of the ComboBox
389
will be automatically updated when this variable is changed.
390
'
391
'----------END
392
'
393
'----------------------------------------------------------------------
394
.SH SUBWIDGETS
395
'
396
'----------BEGIN
397
.LP
398
.nf
399
Name:           \fBarrow\fR
400
Class:          \fBButton\fR
401
.fi
402
.IP
403
The down arrow button.
404
'----------END
405
'
406
'----------BEGIN
407
.LP
408
.nf
409
Name:           \fBcross\fR
410
Class:          \fBButton\fR
411
.fi
412
.IP
413
The cross button. Available only when \fB\-fancy\fR is set.
414
'----------END
415
'
416
'----------BEGIN
417
.LP
418
.nf
419
Name:           \fBentry\fR
420
Class:          \fBEntry\fR
421
.fi
422
.IP
423
The entry that shows the value of this \fBtixControl\fR.
424
'----------END
425
'
426
'----------BEGIN
427
.LP
428
.nf
429
Name:           \fBlabel\fR
430
Class:          \fBLabel\fR
431
.fi
432
.IP
433
The label subwidget.
434
'----------END
435
'
436
'----------BEGIN
437
.LP
438
.nf
439
Name:           \fBlistbox\fR
440
Class:          \fBListbox\fR
441
.fi
442
.IP
443
The listbox that holds all the list entries.
444
'----------END
445
'
446
'----------BEGIN
447
.LP
448
.nf
449
Name:           \fBslistbox\fR
450
Class:          \fBTixScrolledListBox\fR
451
.fi
452
.IP
453
The scrolled-listbox that provides the scrollbars.
454
'----------END
455
'
456
'----------BEGIN
457
.LP
458
.nf
459
Name:           \fBtick\fR
460
Class:          \fBButton\fR
461
.fi
462
.IP
463
The tick button. Available only when \fB\-fancy\fR is set.
464
'----------END
465
'
466
.BE
467
'
468
'
469
'----------------------------------------------------------------------
470
.SH DESCRIPTION
471
'
472
.PP
473
'
474
The \fBtixComboBox\fR command creates a new window (given by the
475
\fIpathName\fR argument) and makes it into a \fBtixComboBox\fR widget.
476
Additional options, described above, may be specified on the command
477
line or in the option database to configure aspects of the
478
ComboBox such as its cursor and relief.
479
 
480
The Tix ComboBox widget is similar to the combo box control in
481
MS Windows. The user can select a choice by either typing in the entry
482
subwdget or selecting from the listbox subwidget.
483
'
484
'----------------------------------------------------------------------
485
.SH WIDGET COMMANDS
486
.PP
487
'
488
The \fBtixComboBox\fR command creates a new Tcl command whose name is the
489
same as the path name of the ComboBox's window.  This command
490
may be used to invoke various operations on the widget. It has the
491
following general form:
492
'
493
.DS C
494
'
495
\fIpathName option \fR?\fIarg arg ...\fR?
496
.PP
497
.DE
498
'
499
\fIPathName\fR is the name of the command, which is the same as the
500
ComboBox widget's path name. \fIOption\fR and the \fIarg\fRs
501
determine the exact behavior of the command.  The following commands
502
are possible for ComboBox widgets:
503
'
504
.TP
505
\fIpathName \fBaddhistory\fI string \fR
506
'
507
Add the string to the beinning of the listbox.
508
'
509
.TP
510
\fIpathName \fBappendhistory\fI string \fR
511
'
512
Append the string to the end of the listbox.
513
'
514
.TP
515
\fIpathName \fBcget\fR \fIoption\fR
516
'
517
Returns the current value of the configuration option given by
518
\fIoption\fR.  \fIOption\fR may have any of the values accepted by the
519
\fBtixComboBox\fR command.
520
'
521
.TP
522
'
523
\fIpathName \fBconfigure\fR ?\fIoption\fR? \fI?value option value ...\fR?
524
'
525
Query or modify the configuration options of the widget.  If no
526
\fIoption\fR is specified, returns a list describing all of the
527
available options for \fIpathName\fR (see \fBTk_ConfigureInfo\fR for
528
information on the format of this list).  If \fIoption\fR is specified
529
with no \fIvalue\fR, then the command returns a list describing the
530
one named option (this list will be identical to the corresponding
531
sublist of the value returned if no \fIoption\fR is specified).  If
532
one or more \fIoption\-value\fR pairs are specified, then the command
533
modifies the given widget option(s) to have the given value(s); in
534
this case the command returns an empty string.  \fIOption\fR may have
535
any of the values accepted by the \fBtixComboBox\fR command.
536
'
537
'
538
.TP
539
\fIpathName \fBflash \fIindex string\fR
540
'
541
Flashes the ComboBox. \fBflash\fR is usually called by a
542
\fI\-command\fR procedure to acknowledge to the user that he has
543
selected a value for the ComboBox.
544
'
545
'
546
.TP
547
\fIpathName \fBinsert \fIindex string\fR
548
'
549
Insert the \fI string\fR into the listbox at the specified index.
550
\fIindex\fR must be a valid listbox index.
551
'
552
'
553
.TP
554
\fIpathName \fBpick \fIindex\fR
555
'
556
Set the (\fIindex\fR)th item in the listbox to be the current value of
557
the ComboBox. As a result, the \fIvalue\fR of the ComboBox is changed
558
and the TCL command sepcified by the \fI\-command\fR option will be
559
called.
560
'
561
'
562
.TP
563
'
564
\fIpathName \fBsubwidget \fI name ?args?\fR
565
'
566
When no options are given, returns the pathname of the subwidget of
567
the specified name.
568
 
569
When options are given, the widget command of the specified subwidget will
570
be called with these options.
571
'
572
'
573
'
574
'----------------------------------------------------------------------
575
.PP
576
.SH BINDINGS
577
.PP
578
.IP [1]
579
If the \fB\-selectmode\fR is "immediate", when the user enters a
580
keystroke, clicks on an item or drags the mouse pointer in the
581
listbox, the \fB\-value\fR of the ComboBox will be immediately set to
582
this item and the \fB\-command\fR procedure will be called.
583
'
584
'
585
.IP [2]
586
If the \fB\-selectmode\fR is "browse", when the user enters a
587
keystroke, clicks on an item or drags the mouse pointer in the
588
listbox, the \fB\-selection\fR of the ComboBox will be immediately set
589
to the new content of the entry subwidget; also the \fB\-browsecmd\fR
590
procedure will be called. The \fB\-value\fR option will be changed
591
only when the user invokes the ComboBox (see [3] below). If the user
592
presses the  key at any time, any new \fB\-selection\fR will
593
be ignored and the text inside the entry subwidget will be restored to
594
the current \fB\-value\fR of the ComboBox.
595
'
596
.IP [3]
597
If the \fB\-dropdown\fR option is true, the user can invoke the
598
ComboBox by releasing the left mouse button over the desired item in
599
the listbox. If the \fB\-dropdown\fR option is false, the user can
600
invoke the ComboBox by double-clicking over the desired item in the
601
listbox. In both cases, the user can also invoke the listbox by
602
pressing the  or  key inside the entry subwidget, or
603
switching the input focus to another widget inside the same toplevel
604
widget
605
'
606
'
607
'----------------------------------------------------------------------
608
.PP
609
.SH BUGS
610
.PP
611
Starting from Tix vetsion 4.0, the default \fB\-value\fR of the
612
ComboBox is the empty string. If you want the ComboBox to show a
613
string by default, you must configure its \fB\-value\fR option
614
explicitly.
615
'
616
'----------------------------------------------------------------------
617
.PP
618
.SH KEYWORDS
619
Tix(n), ComboBox(n), listbox(n)

powered by: WebSVN 2.1.0

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