tixTList - Create and manipulate Tix Tabular List widgets


SYNOPSIS

tixTList pathName ?options?

SUPER-CLASS

None.

STANDARD OPTIONS


background	borderWidth	cursor	foreground
font	height	highlightColor highlightThickness	
relief	selectBackground	selectForeground
xScrollCommand	yScrollCommand	width

See the options(n) manual entry for details on the standard options.

WIDGET-SPECIFIC OPTIONS


Name:		browsecmd
Class:		BrowseCmd
Switch:		-browsecmd


Name:		command
Class:		Command
Switch:		-command


Name:		foreground
Class:		Foreground
Switch:		-foreground
Alias:		-fg


Name:		height
Class:		Height
Switch:		-height


Name:		itemType
Class:		ItemType
Switch:		-itemtype


Name:		orient
Class:		Orient
Switch:		-orient


Name:		padX
Class:		Pad
Switch:		-padx


Name:		padY
Class:		Pad
Switch:		-padx


Name:		selectBackground
Class:		SelectBackground
Switch:		-selectbackground


Name:		selectBorderWidth
Class:		BorderWidth
Switch:		-selectborderwidth


Name:		selectForeground
Class:		SelectForeground
Switch:		-selectforeground


Name:		selectMode
Class:		SelectMode
Switch:		-selectmode


Name:		sizeCmd
Class:		SizeCmd
Switch:		-sizecmd


Name:		state
Class:		State
Switch:		-state


Name:		width
Class:		Width
Switch:		-width

DESCRIPTION

The tixTList command creates a new window (given by the pathName argument) and makes it into a TList widget. Additional options, described above, may be specified on the command line or in the option database to configure aspects of the TList widget such as its cursor and relief.

The TList widget can be used to display data in a tabular format. The list entries of a TList widget are similar to the entries in the Tk listbox widget. The main differences are (1) the TList widget can display the list entries in a two dimensional format and (2) you can use graphical images as well as multiple colors and fonts for the list entries.

Each list entry is identified by an index, which can be in the following forms:

DISPLAY ITEMS

Each list entry in an TList widget is associated with a display item. The display item determines what visual information should be displayed for this list entry. Please see the DItem(n) manual page for a list of all display items.

When a list entry is created by the insert command, the type of its display item is determined by the -itemtype option passed to these commands. If the -itemtype is omitted, then by default used.

WIDGET COMMAND

The tixTList command creates a new Tcl command whose name is the may be used to invoke various operations on the widget. It has the following general form:

pathName option ?arg arg ...?

PathName is the name of the command, which is the same as determine the exact behavior of the command. The following commands are possible for TList widgets:
pathName anchor set index
Sets the anchor to the list entry identified by index. The anchor is the end of the selection that is fixed while dragging out a selection with the mouse.
pathName anchor clear
Removes the anchor, if any, from this TList widget. This only removes the surrounding highlights of the anchor entry and does not affect its selection status.
pathName cget option
Returns the current value of the configuration option given by option. Option may have any of the values accepted by the tixTList command.
pathName configure ?option? ?value option value ...?
Query or modify the configuration options of the widget. If no option is specified, returns a list describing all of the available 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 tixTList command.
pathName delete from ?to?
Deletes one or more list entries between the two entries specified by the indices from and to. If to is not specified, deletes the single entry specified by from.
pathName dragsite set index
Sets the dragsite to the list entry identified by index. The dragsite is used to indicate the source of a drag-and-drop action. Currently drag-and-drop functionality has not been implemented in Tix yet.
pathName dragsite clear
Remove the dragsite, if any, from the this TList widget. This only removes the surrounding highlights of the dragsite entry and does not affect its selection status.
pathName dropsite set index
Sets the dropsite to the list entry identified by index. The dropsite is used to indicate the target of a grag-and-drop action. Currently drag-and-drop functionality has not been implemented in Tix yet.
pathName dropsite clear
Remove the dropsite, if any, from the this TList widget. This only removes the surrounding highlights of the dropsite entry and does not affect its selection status.
pathName entrycget index option
Returns the current value of the configuration option given by option for the entry indentfied by index. Option may have any of the values accepted by the insert widget command.
pathName entryconfigure index ?option? ?value option value ...?
Query or modify the configuration options of the list entry indentfied by index. If no option is specified, returns a list describing all of the available options for index (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 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 insert widget command. The exact set of options depends on the value of the -itemtype option passed to the the insert widget command when this list entry is created.
pathName insert index ?option value ...?
Creates a new list entry at the position indicated by index. The following configuration options can be given to configure the list entry:
The insert widget command accepts additional configuration options to configure the display item associated with this list entry. The set of additional configuration options depends on the type of the display item given by the -itemtype option. Please see the DItem(n) manual page for a list of the configuration options for each of the display item types.
pathName info option arg ...
Query information about the TList widget. option can be one of the following:
pathName nearest x y
Given an (x,y) coordinate within the TList window, this command returns the index of the TList element nearest to that coordinate.
pathName see index
Adjust the view in the TList so that the entry given by index is visible. If the entry is already visible then the command has no effect; if the entry is near one edge of the window then the TList scrolls to bring the element into view at the edge; otherwise the TList widget scrolls to center the entry.
pathName selection option arg ...
This command is used to adjust the selection within a TList widget. It has several forms, depending on option:
pathName xview args
This command is used to query and change the horizontal position of the forms:
pathName yview ?args?
This command is used to query and change the vertical position of the

BINDINGS

EXAMPLE

This example demonstrates how to use an TList to store a list of numbers:

\fC


 set image [tix getimage folder]
 tixTList .t -orient vertical
 .t insert end -itemtype imagetext -image $image -text one
 .t insert end -itemtype imagetext -image $image -text two
 .t insert end -itemtype imagetext -image $image -text three
 .t insert end -itemtype imagetext -image $image -text four
 .t insert end -itemtype imagetext -image $image -text five
 .t insert end -itemtype imagetext -image $image -text six
 pack .t -expand yes -fill both

KEYWORDS

Tix(n), Tabular Listbox, Display Items
Last modified Fri Jan 17 23:02:12 EST 1997 --- Serial 853731306