![]() |
ActiveTcl User Guide
|
![]() |
iwidgets::scrolledlistbox - Create and manipulate scrolled list-
box widgets
iwidgets::scrolledlistbox pathName
?options?
itk::Widget <- iwidgets::Labeledwidget <-
iwidgets::Scrolledwid- get <- iwidgets::Scrolledlistbox
activeBackground background borderWidth cursor exportSelection foreground highlightColor highlightThickness
options.
associated options.
activeRelief elementBorderwidth
jumptroughColor
associated options.
inherited options.
double clicked. Typically this occurs when mouse button 1 is double clicked over an item. Selection policy does not matter.
components such as labels, margins, and scrollbars force the listbox to be compressed. A value of zero along with the same value for the width causes the value given for the visibleitems option to be applied which administers geometry constraints in a different manner. The default height is zero.
scrollbar: static, dynamic, or none. In
static mode, the scroll bar is displayed at all times. Dynamic mode
displays the scroll bar as required, and none disables the scroll
bar display. The default is static.
able to Tk_GetPixels. The default width is 15 pixels..
of the forms acceptable to Tk_GetPixels. The default is 3
pix- els.
selected. Selection policy does not matter.
default is normal.
background within the listbox to be different from the normal
background color.
allows for the font associated with text internal to the scrolled listbox to be different than the font for labels.
box. This option is only administered if the width and height options are both set to zero, otherwise they take precedence.
engaged, geometry constraints are maintained only on the listbox.
scroll bars, are additive and independent, effecting the overall size of the scrolled list box. In contrast, should the width and height options have non zero values, they are applied to the scrolled list box as a whole. The listbox is compressed or expanded to maintain the geometry constraints.
scrollbar: static, dynamic, or none. In
static mode, the scroll bar is displayed at all times. Dynamic mode
displays the scroll bar as required, and none disables the scroll
bar display. The default is static.
components such as labels, margins, and scrollbars force the listbox to be compressed. A value of zero along with the same value for the height causes the value given for the visibleitems option to be applied which administers geometry constraints in a different manner. The default width is zero. _________________________________________________________________
with additional options to manage horizontal and vertical scroll- bars. This includes options to control which scrollbars are dis- played and the method, i.e. statically or dynamically.
whose name is pathName. This command may be used to invoke various operations on the widget. It has the following general form:
pathName option ?arg arg ...?
argument an indicator of which entry of the list box to operate
on. These indicators are called indexes and may be specified
in any of the following forms:
widgets:
activate bbox curselection delete
methods.
pathName cget option
option. Option may have any of the values accepted
by the iwid- gets::scrolledlistbox command.
pathName clear
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 iwidgets::scrolledlistbox
command. pathName getcurselection
rent selection indexes. Short cut version of get and curselec-
tion command combination.
pathName justify direction
directions: left, right, top, or
bottom.
pathName selecteditemcount
pathName sort order
command. Also accepts either ascending or descending order.
widget manual entry for details on the listbox component item.
«scrollbar» widget manual entry for details on the
horizsb compo- nent item.
«scrollbar» widget manual entry for details on the vertsb compo- nent item.
package require Iwidgets 4.0
option add *textBackground white
proc selCmd {} {
puts stdout «[.slb getcurselection]"
}
proc defCmd {} {
puts stdout «Double Click"
return [selCmd]
}
iwidgets::scrolledlistbox .slb -selection single \ -vscrollmode
static -hscrollmode dynamic -labeltext «List» \
-selectioncommand selCmd -dblclickcommand defCmd pack .slb -padx 10
-pady 10 -fill both -expand yes .slb insert end {Hello {Out There}
World}
scrolledlistbox, listbox, widget