selectionbox - Create and manipulate a selection box widget
selectionbox pathName ?options?
itk::Widget <- selectionbox
options.
textBackground textFont
above associated options.
above associated options.
activeRelief elementBorderWidth jumptroughColor
above associated options.
dblClickCommand hscrollMode sbWidth scrollMargin
textBackground textFont vscrollMode
on the above associated options.
s, e, w, or . The default is center
specified in any of the forms acceptable to Tk_GetPixels. The
default is 320 pixels.
item.
is «List".
list: n, ne, e, se, s, sw, w, or nw. The default is nw.
forms acceptable to Tcl_GetBoolean. The default is true.
any of the forms acceptable to Tk_GetPixels. The default is 7
pixels.
press event in the selection entry field.
tion: n, ne, e, se, s, sw, w, or nw. The default is nw.
the forms acceptable to Tcl_GetBoolean. The default is true.
ified in any of the forms acceptable to Tk_GetPixels. The
default is 260 pixels.
_________________________________________________________________
selection entry field. The user may choose any of the items dis- played in the scrolled list of alternatives and the selection field will be filled with the choice. The user is also free to enter a new value in the selection entry field. Both the list and entry areas have labels. A child site is also provided in which the user may create other widgets to be used in conjunction with the selection box.
pathName. This command may be used to invoke various operations on the widget. It has the following general form:
pathName option ?arg arg ...?
curselection delete index nearest
associated methods.
pathName cget option
option. Option may have any of the values accepted by the selec-
tionbox command.
pathName childsite
pathName clear component
list. The component argument may be either items or selection.
pathName configure ?option? ?value option value ...?
option is specified, returns a list describing all of the avail-
able options for pathName (see Tk_ConfigureInfo for information
on the format of this list). If option is specified with no
value, then the command returns a list describing the one named
option (this list will be identical to the corresponding sublist
of the value returned if no option is specified). If one or more
option-value pairs are specified, then the command modifies the
given widget option(s) to have the given value(s); in this case
the command returns an empty string. Option may have any of the
values accepted by the selectionbox command.
pathName get
pathName insert component args
list. The component argument may be either items or selection.
depending on the component value.
pathName selectitem
selected items value.
box. See the «frame» widget manual entry for details on the
childsite component item.
the selection box. See the «scrolledlistbox» widget manual entry
for details on the items component item.
box for display of the selected item in the items component. See the «entryfield» widget manual entry for details on the selection component item.
option add *textBackground white
selectionbox .sb -items {Hello {Out There} World} pack .sb -padx 10 -pady 10 -fill both -expand yes
set cs [label [.sb childsite].label -text «Child Site"] pack $cs -fill x -padx 10 -pady 10
.sb insert items 2 {Cruel Cruel}
.sb selection set 1
selectionbox, widget