mclistbox::mclistbox - Create and manipulate a multi-column listbox
package require mclistbox ?1.02
mclistbox::mclistbox pathName ?options?
mclistbox
-background -borderwidth -cursor -exportselection -font -foreground -height -highlightbackground -highlightcolor -highlightthickness -relief -selectbackground -selectborderwidth -selectforeground -setgrid -takefocus -width -xscrollcommand -yscrollcommand
See the options manual entry for detailed descriptions of the above options.
Command-Line Name: -columnborderwidth
Database Name: columnBorderWidth
Database Class: BorderWidth
Specifies a non-negative value indicating the width of the 3-D border to draw around the outside of the column (if such a border is being drawn; the columnrelief option typically determines this). The value may also be used when drawing 3-D effects in the interior of the widget. The value may have any of the forms acceptable to Tk_GetPixels.
Command-Line Name: -columnrelief
Database Name: columnRelief
Database Class: Relief
Specifies the 3-D effect desired for the column. Acceptable values are raised, sunken, flat, ridge, solid, and groove. The value indicates how the interior of the column should appear relative to its exterior; for example, raised means the interior of the column should appear to protrude from the screen, relative to the exterior of the column.
Command-Line Name: -fillcolumn
Database Name: fillColumn
Database Class: FillColumn
Specifies which column should grow or shrink such that all columns exactly fill the listbox widget.
Command-Line Name: -labelanchor
Database Name: labelAnchor
Database Class: Anchor
Specifies how the information in the column label is to be displayed. Must be one of the values n, ne, e, se, s, sw, w, nw, or center. For example, nw means display the information such that its top-left corner is at the top-left corner of the column label.
Command-Line Name: -labelbackground or -labelbg
Database Name: labelBackground
Database Class: Background
Specifies the normal background color to use when displaying the label.
Command-Line Name: -labelborderwidth or -labelbd
Database Name: labelBorderWidth
Database Class: BorderWidth
Specifies a non-negative value indicating the width of the 3-D border to draw around the outside of the column label (if such a border is being drawn; the relief option typically determines this). The value may also be used when drawing 3-D effects in the interior of the column label. The value may have any of the forms acceptable to Tk_GetPixels.
Command-Line Name: -labelfont
Database Name: labelFont
Database Class: Font
Specifies the font to use when drawing text inside the column label.
Command-Line Name: -labelforeground
Database Name: labelForeground
Database Class: Foreground
Specifies the normal foreground color to use when displaying the column label.
Command-Line Name: -labelheight
Database Name: labelHeight
Database Class: Height
Specifies a desired height for the label. If an image or bitmap is being displayed in the label then the value is in screen units (i.e. any of the forms acceptable to Tk_GetPixels); for text it is in lines of text. If this option isn't specified, the label's desired height is computed from the size of the image or bitmap or text being displayed in it.
Command-Line Name: -labelrelief
Database Name: labelRelief
Database Class: Relief
Specifies the 3-D effect desired for the column label. Acceptable values are raised, sunken, flat, ridge, solid, and groove. The value indicates how the interior of the column label should appear relative to its exterior; for example, raised means the interior of the column label should appear to protrude from the screen, relative to the exterior of the column label.
Command-Line Name: -labels
Database Name: labels
Database Class: Labels
A boolean value which determines whether column labels are shown or not.
Command-Line Name: -selectcommand command
Database Name: selectCommand
Database Class: Command
Specifies a Tcl command to be run whenever the selection in the mclistbox changes. The command will be called with the result of the curselection command.
Command-Line Name: -resizablecolumns
Database Name: resizableColumns
Database Class: ResizableColumns
Specifies whether the columns can be resized interactively. If set to true, mouse bindings will be defined to allow the columns to be resized. See DEFAULT BINDINGS for more information.
Command-Line Name: -selectmode
Database Name: selectMode
Database Class: SelectMode
Specifies one of several styles for manipulating the selection. The value of the option may be arbitrary, but the default bindings expect it to be either single, browse, multiple, or extended; the default value is browse.
The mclistbox command creates a new window (given by the pathName argument) and makes it into a mclistbox widget. Additional options, described above, may be specified on the command line to configure aspects of the mclistbox such as its colors, font, text, and relief. The mclistbox command returns its pathName argument. At the time this command is invoked, there must not exist a window named pathName, but pathName's parent must exist.
A mclistbox is a widget that displays a list of strings, one per line. When first created, a new mclistbox has no elements and no columns. Columns and elementd may be added or deleted using widget commands described below. In addition, one or more elements may be selected as described below. When an element in one column is selected, the elements in all columns are selected.
It is not necessary for all the elements to be displayed in the mclistbox window at once; commands described below may be used to change the view in the window. Mclistboxes allow scrolling in both directions using the standard xScrollCommand and yScrollCommand options. They also support scanning, as described below.
The widget command accepts many of the same arguments as the standard listbox command. The following commands behave identically to the standard listbox commands:
activate bbox cget configure curselection delete index nearest scan see selection size xview yview
In addition, there are a few commands un