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

Subversion Repositories or1k

[/] [or1k/] [trunk/] [insight/] [itcl/] [iwidgets3.0.0/] [doc/] [combobox.n] - Diff between revs 578 and 1765

Only display areas with differences | Details | Blame | View Log

Rev 578 Rev 1765
'\"
'\"
'\" Copyright (c) 1995 John S. Sigler
'\" Copyright (c) 1995 John S. Sigler
'\" Copyright (c) 1997 Mitch Gorman
'\" Copyright (c) 1997 Mitch Gorman
'\"
'\"
'\" See the file "license.terms" for information on usage and redistribution
'\" See the file "license.terms" for information on usage and redistribution
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
'\"
'\"
'\" @(#) Combobox.n
'\" @(#) Combobox.n
'/"
'/"
.so man.macros
.so man.macros
.HS combobox iwid
.HS combobox iwid
.BS
.BS
'\" Note:  do not modify the .SH NAME line immediately below!
'\" Note:  do not modify the .SH NAME line immediately below!
.SH NAME
.SH NAME
combobox \- Create and manipulate combination box widgets
combobox \- Create and manipulate combination box widgets
.SH SYNOPSIS
.SH SYNOPSIS
\fBcombobox\fI \fIpathName \fR?\fIoptions\fR?
\fBcombobox\fI \fIpathName \fR?\fIoptions\fR?
.SH "INHERITANCE"
.SH "INHERITANCE"
itk::Widget <- LabeledWidget <- Entryfield <- Combobox
itk::Widget <- LabeledWidget <- Entryfield <- Combobox
.SH "STANDARD OPTIONS"
.SH "STANDARD OPTIONS"
.LP
.LP
.ta 4c 8c 12c
.ta 4c 8c 12c
.nf
.nf
\fB\fR
\fB\fR
\fB
\fB
background      borderWidth     cursor  justify
background      borderWidth     cursor  justify
exportSelection foreground      highlightColor  highlightThickness
exportSelection foreground      highlightColor  highlightThickness
relief  width   insertWidth     insertBackground
relief  width   insertWidth     insertBackground
insertOffTime   insertOnTime    insertWidth     insertBorderWidth
insertOffTime   insertOnTime    insertWidth     insertBorderWidth
selectForeground        selectBackground
selectForeground        selectBackground
selectBorderWidth       textVariable
selectBorderWidth       textVariable
\fR
\fR
.fi
.fi
.LP
.LP
See the "options" manual entry for details on the standard options.
See the "options" manual entry for details on the standard options.
.SH "ASSOCIATED OPTIONS"
.SH "ASSOCIATED OPTIONS"
.LP
.LP
.nf
.nf
.ta 4c 8c 12c
.ta 4c 8c 12c
\fBhscrollmode\fR       \fBtextBackground\fR    \fBtextFont\fR  \fBvscrollmode\fR
\fBhscrollmode\fR       \fBtextBackground\fR    \fBtextFont\fR  \fBvscrollmode\fR
.fi
.fi
.LP
.LP
See the "scrolledlistbox" manual entry for details on the above inherited
See the "scrolledlistbox" manual entry for details on the above inherited
options.
options.
.LP
.LP
.nf
.nf
.ta 4c 8c 12c
.ta 4c 8c 12c
\fBshow\fR
\fBshow\fR
.fi
.fi
.LP
.LP
See the "entry" manual entry for details on the above inherited option.
See the "entry" manual entry for details on the above inherited option.
.SH "INHERITED OPTIONS"
.SH "INHERITED OPTIONS"
.LP
.LP
.nf
.nf
.ta 4c 8c 12c
.ta 4c 8c 12c
\fBchildSitePos\fR      \fBcommand\fR   \fBfixed\fR     \fBfocusCommand\fR
\fBchildSitePos\fR      \fBcommand\fR   \fBfixed\fR     \fBfocusCommand\fR
\fBinvalid\fR   \fBtextBackground\fR    \fBtextFont\fR  \fBvalidate\fR
\fBinvalid\fR   \fBtextBackground\fR    \fBtextFont\fR  \fBvalidate\fR
.fi
.fi
.LP
.LP
See the "entryfield" class manual entry for details on the inherited options.
See the "entryfield" class manual entry for details on the inherited options.
.LP
.LP
.nf
.nf
.ta 4c 8c 12c
.ta 4c 8c 12c
\fBlabelBitmap\fR       \fBlabelFont\fR \fBlabelImage\fR        \fBlabelMargin\fR
\fBlabelBitmap\fR       \fBlabelFont\fR \fBlabelImage\fR        \fBlabelMargin\fR
\fBlabelPos\fR  \fBlabelText\fR \fBlabelVariable\fR
\fBlabelPos\fR  \fBlabelText\fR \fBlabelVariable\fR
.fi
.fi
.LP
.LP
See the "labeledwidget" class manual entry for details on the
See the "labeledwidget" class manual entry for details on the
inherited options.
inherited options.
.SH "WIDGET-SPECIFIC OPTIONS"
.SH "WIDGET-SPECIFIC OPTIONS"
.LP
.LP
.nf
.nf
Name:   \fBarrowRelief\fR
Name:   \fBarrowRelief\fR
Class:  \fBRelief\fR
Class:  \fBRelief\fR
Command-Line Switch:    \fB-arrowrelief\fR
Command-Line Switch:    \fB-arrowrelief\fR
.fi
.fi
.IP
.IP
Specifies the relief style to use for a dropdown Combobox's arrow
Specifies the relief style to use for a dropdown Combobox's arrow
button in a normal (not depressed) state. Acceptable values
button in a normal (not depressed) state. Acceptable values
are \fBraised\fR, \fBsunken\fR, \fBflat\fR, \fBridge\fR, and \fBgroove\fR.
are \fBraised\fR, \fBsunken\fR, \fBflat\fR, \fBridge\fR, and \fBgroove\fR.
Sunken is discouraged as this is the relief used to indicate a depressed
Sunken is discouraged as this is the relief used to indicate a depressed
state. This option has no effect on simple Comboboxes. The default is raised.
state. This option has no effect on simple Comboboxes. The default is raised.
.LP
.LP
.nf
.nf
Name:   \fBcompletion\fR
Name:   \fBcompletion\fR
Class:  \fBCompletion\fR
Class:  \fBCompletion\fR
Command-Line Switch:    \fB-completion\fR
Command-Line Switch:    \fB-completion\fR
.fi
.fi
.IP
.IP
Boolean given in any of the forms acceptable to \fBTcl_GetBoolean\fR which
Boolean given in any of the forms acceptable to \fBTcl_GetBoolean\fR which
determines whether insertions into the entry field, whether from the
determines whether insertions into the entry field, whether from the
keyboard or programmatically via the \fBinsert\fR method, are
keyboard or programmatically via the \fBinsert\fR method, are
automatically completed with the first matching item from the listbox.  The
automatically completed with the first matching item from the listbox.  The
default is true.
default is true.
.LP
.LP
.nf
.nf
Name:   \fBdropdown\fR
Name:   \fBdropdown\fR
Class:  \fBDropdown\fR
Class:  \fBDropdown\fR
Command-Line Switch:    \fB-dropdown\fR
Command-Line Switch:    \fB-dropdown\fR
.fi
.fi
.IP
.IP
Boolean describing the Combobox layout style given in any of the forms
Boolean describing the Combobox layout style given in any of the forms
acceptable to \fBTcl_GetBoolean\fR. If true, the Combobox
acceptable to \fBTcl_GetBoolean\fR. If true, the Combobox
will be a dropdown style
will be a dropdown style
widget which displays an entry field and an arrow button which when activated
widget which displays an entry field and an arrow button which when activated
will pop up a scrollable list of items. If false, a simple Combobox style
will pop up a scrollable list of items. If false, a simple Combobox style
will be used which has an entry field and a scrollable list beneath it
will be used which has an entry field and a scrollable list beneath it
which is always visible. Both styles allow an optional label for the entry
which is always visible. Both styles allow an optional label for the entry
field area. The default is true.
field area. The default is true.
.LP
.LP
.nf
.nf
Name:   \fBeditable\fR
Name:   \fBeditable\fR
Class:  \fBEditable\fR
Class:  \fBEditable\fR
Command-Line Switch:    \fB-editable\fR
Command-Line Switch:    \fB-editable\fR
.fi
.fi
.IP
.IP
Boolean describing whether or not the text entry area is editable
Boolean describing whether or not the text entry area is editable
by the user. If true the user can add items to the combobox by entering text
by the user. If true the user can add items to the combobox by entering text
into the entry area and then pressing Return. If false, the list of items is
into the entry area and then pressing Return. If false, the list of items is
non-editable and can only be changed by calling the insert or delete
non-editable and can only be changed by calling the insert or delete
methods. (The value in the entry field can still be modified by selecting
methods. (The value in the entry field can still be modified by selecting
from the list.)  Given in any of the forms acceptable to \fBTcl_GetBoolean\fR.
from the list.)  Given in any of the forms acceptable to \fBTcl_GetBoolean\fR.
The default is true.
The default is true.
.LP
.LP
.nf
.nf
Name:   \fBgrab\fR
Name:   \fBgrab\fR
Class:  \fBGrab\fR
Class:  \fBGrab\fR
Command-Line Switch:    \fB-grab\fR
Command-Line Switch:    \fB-grab\fR
.fi
.fi
.IP
.IP
This option sets the grab scope for the appearance of the listbox in
This option sets the grab scope for the appearance of the listbox in
drop-down comboboxes.  It can be either global or local.  The default is
drop-down comboboxes.  It can be either global or local.  The default is
local.
local.
.LP
.LP
.nf
.nf
Name:   \fBlistHeight\fR
Name:   \fBlistHeight\fR
Class:  \fBHeight\fR
Class:  \fBHeight\fR
Command-Line Switch:    \fB-listheight\fR
Command-Line Switch:    \fB-listheight\fR
.fi
.fi
.IP
.IP
Height of the listbox specified in any of the forms acceptable to
Height of the listbox specified in any of the forms acceptable to
\fBTk_GetPixels\fR.  The default is 150 pixels.
\fBTk_GetPixels\fR.  The default is 150 pixels.
.LP
.LP
.nf
.nf
Name:   \fBmargin\fR
Name:   \fBmargin\fR
Class:  \fBMargin\fR
Class:  \fBMargin\fR
Command-Line Switch:    \fB-margin\fR
Command-Line Switch:    \fB-margin\fR
.fi
.fi
.IP
.IP
Specifies the width in pixels between the entry component and the arrow button
Specifies the width in pixels between the entry component and the arrow button
for a dropdown Combobox given in any of the forms acceptable to
for a dropdown Combobox given in any of the forms acceptable to
\fBTk_GetPixels\fR. This option has no effect on a simple Combobox. The
\fBTk_GetPixels\fR. This option has no effect on a simple Combobox. The
default is 1.
default is 1.
.LP
.LP
.nf
.nf
Name:   \fBpopupCursor\fR
Name:   \fBpopupCursor\fR
Class:  \fBCursor\fR
Class:  \fBCursor\fR
Command-Line Switch:    \fB-popupcursor\fR
Command-Line Switch:    \fB-popupcursor\fR
.fi
.fi
.IP
.IP
Specifies the cursor to be used for dropdown style listboxes. The value
Specifies the cursor to be used for dropdown style listboxes. The value
may have any of the forms acceptable to \fBTk_GetCursor\fR. The default is
may have any of the forms acceptable to \fBTk_GetCursor\fR. The default is
arrow.
arrow.
.LP
.LP
.nf
.nf
Name:   \fBselectionCommand\fR
Name:   \fBselectionCommand\fR
Class:  \fBSelectionCommand\fR
Class:  \fBSelectionCommand\fR
Command-Line Switch:    \fB-selectioncommand\fR
Command-Line Switch:    \fB-selectioncommand\fR
.fi
.fi
.IP
.IP
Specifies a Tcl command procedure which is called when an item in the
Specifies a Tcl command procedure which is called when an item in the
listbox area is selected. The item will be selected in the list, the listbox
listbox area is selected. The item will be selected in the list, the listbox
will be removed if it is a dropdown Combobox, and the selected item's
will be removed if it is a dropdown Combobox, and the selected item's
text will be inserted into the entry field before the -selectioncommand proc is
text will be inserted into the entry field before the -selectioncommand proc is
called. The default is {}.
called. The default is {}.
.LP
.LP
.nf
.nf
Name:   \fBstate\fR
Name:   \fBstate\fR
Class:  \fBState\fR
Class:  \fBState\fR
Command-Line Switch:    \fB-state\fR
Command-Line Switch:    \fB-state\fR
.fi
.fi
.IP
.IP
Specifies the overall state of the Combobox megawidget.  Can be either
Specifies the overall state of the Combobox megawidget.  Can be either
normal or disabled.  If the Combobox is disabled, no text can be entered
normal or disabled.  If the Combobox is disabled, no text can be entered
into the entry field, no selection can be made in the listbox, and the
into the entry field, no selection can be made in the listbox, and the
arrowBtn component is disabled.  The default is normal.
arrowBtn component is disabled.  The default is normal.
.LP
.LP
.nf
.nf
Name:   \fBunique\fR
Name:   \fBunique\fR
Class:  \fBUnique\fR
Class:  \fBUnique\fR
Command-Line Switch:    \fB-unique\fR
Command-Line Switch:    \fB-unique\fR
.fi
.fi
.IP
.IP
Boolean describing whether or not duplicate items are allowed in the combobox
Boolean describing whether or not duplicate items are allowed in the combobox
list. If true, then duplicates are not allowed to be inserted. If false, a
list. If true, then duplicates are not allowed to be inserted. If false, a
duplicate entry causes selection of the item. Given in any of the forms
duplicate entry causes selection of the item. Given in any of the forms
acceptable to \fBTcl_GetBoolean\fR. The default is true.
acceptable to \fBTcl_GetBoolean\fR. The default is true.
.BE
.BE
.SH DESCRIPTION
.SH DESCRIPTION
.PP
.PP
The \fBcombobox\fR command creates an enhanced entry field widget with an
The \fBcombobox\fR command creates an enhanced entry field widget with an
optional associated label and a scrollable list. When an item is selected in
optional associated label and a scrollable list. When an item is selected in
the list area of a Combobox, its value is then displayed in the entry field
the list area of a Combobox, its value is then displayed in the entry field
text area. Functionally similar to an Optionmenu, the Combobox adds (optional)
text area. Functionally similar to an Optionmenu, the Combobox adds (optional)
list scrolling and (optional) item editing and inserting capabilities.
list scrolling and (optional) item editing and inserting capabilities.
.PP
.PP
There are two basic styles of Comboboxes (determined by the -dropdown option):
There are two basic styles of Comboboxes (determined by the -dropdown option):
dropdown and simple. The dropdown style adds an arrow button to the right of
dropdown and simple. The dropdown style adds an arrow button to the right of
the entry field which when activated will pop up (and down) the scrolled
the entry field which when activated will pop up (and down) the scrolled
listbox beneath the entry field. The simple (non-dropdown) Combobox
listbox beneath the entry field. The simple (non-dropdown) Combobox
permanently displays the listbox beneath the entry field and has no
permanently displays the listbox beneath the entry field and has no
arrow button. Either style allows an optional entry field label.
arrow button. Either style allows an optional entry field label.
.SH "METHODS"
.SH "METHODS"
.PP
.PP
The \fBcombobox\fR command creates a new Tcl command whose
The \fBcombobox\fR command creates a new Tcl command whose
name is \fIpathName\fR. This
name is \fIpathName\fR. This
command may be used to invoke various
command may be used to invoke various
operations on the widget. It has the following general form:
operations on the widget. It has the following general form:
.DS C
.DS C
\fIpathName option \fR?\fIarg arg ...\fR?
\fIpathName option \fR?\fIarg arg ...\fR?
.DE
.DE
\fIOption\fR and the \fIarg\fRs
\fIOption\fR and the \fIarg\fRs
determine the exact behavior of the command. The following
determine the exact behavior of the command. The following
commands are possible for Combobox widgets:
commands are possible for Combobox widgets:
.SH "ASSOCIATED METHODS"
.SH "ASSOCIATED METHODS"
.LP
.LP
.nf
.nf
.ta 4c 8c 12c
.ta 4c 8c 12c
\fBicursor\fR   \fBscan\fR
\fBicursor\fR   \fBscan\fR
.fi
.fi
.LP
.LP
See the "entry" manual entries for details on the above associated methods.
See the "entry" manual entries for details on the above associated methods.
.LP
.LP
.nf
.nf
.ta 4c 8c 12c
.ta 4c 8c 12c
\fBcurselection\fR      \fBindex\fR     \fBsee\fR       \fBsize\fR
\fBcurselection\fR      \fBindex\fR     \fBsee\fR       \fBsize\fR
\fBxview\fR     \fByview\fR
\fBxview\fR     \fByview\fR
.fi
.fi
.LP
.LP
See the "listbox" manual entries for details on the above associated methods.
See the "listbox" manual entries for details on the above associated methods.
.LP
.LP
.nf
.nf
.ta 4c 8c 12c
.ta 4c 8c 12c
\fBgetcurselection\fR   \fBjustify\fR   \fBsort\fR
\fBgetcurselection\fR   \fBjustify\fR   \fBsort\fR
.fi
.fi
.LP
.LP
See the "scrolledlistbox" manual entries for details on the above associated
See the "scrolledlistbox" manual entries for details on the above associated
methods.
methods.
.LP
.LP
.SH "WIDGET-SPECIFIC METHODS"
.SH "WIDGET-SPECIFIC METHODS"
.TP
.TP
\fIpathName \fBcget\fR \fIoption\fR
\fIpathName \fBcget\fR \fIoption\fR
Returns the current value of the configuration option given
Returns the current value of the configuration option given
by \fIoption\fR.
by \fIoption\fR.
\fIOption\fR may have any of the values accepted by the \fBcombobox\fR
\fIOption\fR may have any of the values accepted by the \fBcombobox\fR
command.
command.
.TP
.TP
\fIpathName \fBclear\fR ?\fBcomponent\fR?
\fIpathName \fBclear\fR ?\fBcomponent\fR?
Clears the contents from one or both components. Valid component values
Clears the contents from one or both components. Valid component values
are \fBlist\fR, or \fBentry\fR.  With no component specified, both are cleared.
are \fBlist\fR, or \fBentry\fR.  With no component specified, both are cleared.
.TP
.TP
\fIpathName\fR \fBconfigure\fR ?\fIoption\fR? ?\fIvalue option value ...\fR?
\fIpathName\fR \fBconfigure\fR ?\fIoption\fR? ?\fIvalue option value ...\fR?
Query or modify the configuration options of the widget.
Query or modify the configuration options of the widget.
If no \fIoption\fR is specified, returns a list describing all of
If no \fIoption\fR is specified, returns a list describing all of
the available options for \fIpathName\fR (see \fBTk_ConfigureInfo\fR for
the available options for \fIpathName\fR (see \fBTk_ConfigureInfo\fR for
information on the format of this list).  If \fIoption\fR is specified
information on the format of this list).  If \fIoption\fR is specified
with no \fIvalue\fR, then the command returns a list describing the
with no \fIvalue\fR, then the command returns a list describing the
one named option (this list will be identical to the corresponding
one named option (this list will be identical to the corresponding
sublist of the value returned if no \fIoption\fR is specified).  If
sublist of the value returned if no \fIoption\fR is specified).  If
one or more \fIoption\-value\fR pairs are specified, then the command
one or more \fIoption\-value\fR pairs are specified, then the command
modifies the given widget option(s) to have the given value(s);  in
modifies the given widget option(s) to have the given value(s);  in
this case the command returns an empty string.
this case the command returns an empty string.
\fIOption\fR may have any of the values accepted by the \fBcombobox\fR
\fIOption\fR may have any of the values accepted by the \fBcombobox\fR
command.
command.
.TP
.TP
\fIpathName \fBdelete \fIcomponent\fR \fIfirst\fR ?\fIlast\fR?
\fIpathName \fBdelete \fIcomponent\fR \fIfirst\fR ?\fIlast\fR?
Delete one or more elements from a given component, \fBlist\fR or \fBentry\fR.
Delete one or more elements from a given component, \fBlist\fR or \fBentry\fR.
If a list item to be removed is currently selected (displayed in the entry
If a list item to be removed is currently selected (displayed in the entry
field area), the entry field will be cleared.
field area), the entry field will be cleared.
.TP
.TP
\fIpathName \fBget ?\fIindex\fR? \fR
\fIpathName \fBget ?\fIindex\fR? \fR
With no arguments, returns the contents currently in the entry
With no arguments, returns the contents currently in the entry
field area. With a single argument, returns the contents of the
field area. With a single argument, returns the contents of the
listbox item at the indicated index.
listbox item at the indicated index.
.TP
.TP
\fIpathName \fBinsert\fR \fIcomponent\fR \fIindex\fR \fIelement\fR ?\fIelement element ...\fR?
\fIpathName \fBinsert\fR \fIcomponent\fR \fIindex\fR \fIelement\fR ?\fIelement element ...\fR?
Insert one or more new elements into the given component, \fBlist\fR or
Insert one or more new elements into the given component, \fBlist\fR or
\fBentry\fR, just before the element given by \fIindex\fR.
\fBentry\fR, just before the element given by \fIindex\fR.
.TP
.TP
\fIpathName \fBselection\fR \fIoption\fR \fIfirst\fR ?\fIlast\fR?
\fIpathName \fBselection\fR \fIoption\fR \fIfirst\fR ?\fIlast\fR?
Adjust the selection within the listbox component and updates the contents
Adjust the selection within the listbox component and updates the contents
of the entry field component to the value of the selected item. See the
of the entry field component to the value of the selected item. See the
"listbox" manual entry for more details on parameter options.
"listbox" manual entry for more details on parameter options.
.SH "COMPONENTS"
.SH "COMPONENTS"
.LP
.LP
.nf
.nf
Name:   \fBentry\fR
Name:   \fBentry\fR
Class:  \fBEntry\fR
Class:  \fBEntry\fR
.fi
.fi
.IP
.IP
Text entry area where the current selection is displayed. If the
Text entry area where the current selection is displayed. If the
Combobox is editable and its state is normal, the user can edit the
Combobox is editable and its state is normal, the user can edit the
contents of this item.
contents of this item.
.LP
.LP
.nf
.nf
Name:   \fBlist\fR
Name:   \fBlist\fR
Class:  \fBScrolledlistbox\fR
Class:  \fBScrolledlistbox\fR
.fi
.fi
.IP
.IP
Scrollable list which stores all the items which the user can select
Scrollable list which stores all the items which the user can select
from. For dropdown Comboboxes, this component is hidden until the user pops it
from. For dropdown Comboboxes, this component is hidden until the user pops it
up by pressing on the arrow button to the right of the entry component. For
up by pressing on the arrow button to the right of the entry component. For
simple Comboboxes this component is always visible just beneath the entry
simple Comboboxes this component is always visible just beneath the entry
component.
component.
.SH "DEFAULT BINDINGS"
.SH "DEFAULT BINDINGS"
.PP
.PP
The Combobox generally has the same bindings as its primary component items -
The Combobox generally has the same bindings as its primary component items -
the Scrolledlistbox and Entryfield. However it also adds these:
the Scrolledlistbox and Entryfield. However it also adds these:
.PP
.PP
[1] Button-1 mouse press on the arrow key of a dropdown Combobox causes the
[1] Button-1 mouse press on the arrow key of a dropdown Combobox causes the
list to be popped up. If the combobox is non-editable, a Button-1 press on the
list to be popped up. If the combobox is non-editable, a Button-1 press on the
entry field area will also pop up the list.
entry field area will also pop up the list.
.PP
.PP
[2] Button-1 mouse press anywhere on the display removes a dropdown listbox
[2] Button-1 mouse press anywhere on the display removes a dropdown listbox
which has been popped up, unless the keypress is upon one of the Combobox
which has been popped up, unless the keypress is upon one of the Combobox
scrollbars which scrolls the list. If it is pressed upon an item in the list
scrollbars which scrolls the list. If it is pressed upon an item in the list
area, that item will be selected before the list is removed.
area, that item will be selected before the list is removed.
.PP
.PP
[3] Button-3 mouse press on the arrow key of a dropdown Combobox causes the
[3] Button-3 mouse press on the arrow key of a dropdown Combobox causes the
next item to be selected. Shift-Button-3 causes the previous item to be
next item to be selected. Shift-Button-3 causes the previous item to be
selected.
selected.
.PP
.PP
[4] Escape keypress removes a dropdown list which has been popped up.
[4] Escape keypress removes a dropdown list which has been popped up.
.PP
.PP
[5] The  and  keystrokes select the current item. They also
[5] The  and  keystrokes select the current item. They also
remove the popped up list for dropdown comboboxes.
remove the popped up list for dropdown comboboxes.
.PP
.PP
[6] Up and Down arrow keypresses from the entry field and arrow button
[6] Up and Down arrow keypresses from the entry field and arrow button
component cause the previous and next items in the listbox to be selected
component cause the previous and next items in the listbox to be selected
respectively. Ctl-P and Ctl-N are similarly mapped for emacs emulation.
respectively. Ctl-P and Ctl-N are similarly mapped for emacs emulation.
.PP
.PP
[7] Entry field and arrow button component Shift-Up and Shift-Down arrow keys
[7] Entry field and arrow button component Shift-Up and Shift-Down arrow keys
pop up and down the listbox of a dropdown Combobox. The arrow button component
pop up and down the listbox of a dropdown Combobox. The arrow button component
also maps  and  similarly.
also maps  and  similarly.
.SH EXAMPLE
.SH EXAMPLE
.DS
.DS
 proc selectCmd {} {
 proc selectCmd {} {
    puts stdout "[.cb2 getcurselection]"
    puts stdout "[.cb2 getcurselection]"
 }
 }
 #
 #
 # Non-editable Dropdown Combobox
 # Non-editable Dropdown Combobox
 #
 #
 combobox .cb1 -labeltext Month: \\
 combobox .cb1 -labeltext Month: \\
     -selectioncommand {puts "selected: [.cb1 getcurselection]"} \\
     -selectioncommand {puts "selected: [.cb1 getcurselection]"} \\
     -editable false -listheight 185 -popupcursor hand1
     -editable false -listheight 185 -popupcursor hand1
 .cb1 insert list end Jan Feb Mar Apr May June Jul Aug Sept Oct Nov Dec
 .cb1 insert list end Jan Feb Mar Apr May June Jul Aug Sept Oct Nov Dec
 #
 #
 # Editable Dropdown Combobox
 # Editable Dropdown Combobox
 #
 #
 combobox .cb2 -labeltext "Operating System:" -selectioncommand selectCmd
 combobox .cb2 -labeltext "Operating System:" -selectioncommand selectCmd
 .cb2 insert list end Linux HP-UX SunOS Solaris Irix
 .cb2 insert list end Linux HP-UX SunOS Solaris Irix
 .cb2 insert entry end L
 .cb2 insert entry end L
 pack .cb1 -padx 10 -pady 10 -fill x
 pack .cb1 -padx 10 -pady 10 -fill x
 pack .cb2 -padx 10 -pady 10 -fill x
 pack .cb2 -padx 10 -pady 10 -fill x
.DE
.DE
.SH ORIGINAL AUTHOR
.SH ORIGINAL AUTHOR
John S. Sigler
John S. Sigler
.SH CURRENT MAINTAINER
.SH CURRENT MAINTAINER
Mitch Gorman (logain@erols.com)
Mitch Gorman (logain@erols.com)
.SH KEYWORDS
.SH KEYWORDS
combobox, entryfield, scrolledlistbox, itk::Widget, entry, listbox, widget,
combobox, entryfield, scrolledlistbox, itk::Widget, entry, listbox, widget,
iwidgets
iwidgets
 
 

powered by: WebSVN 2.1.0

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