clist
Author: Peter G. Baum (peter@dr-baum.net)
Keywords: gnocl, Tcl, gtk, gnome

## NAME

clist - Create and manipulate a clist widget.

## SYNOPSIS

clist ?-option optionVal ...?

## OPTIONS

-columns
  Number of columns
  type: integer
  default: 1

-selectionMode
  Determines whether one or more rows can be selected at a time. single means only one row can be selected, browse means exactly one row can be selected, multiple extended ???
  type: single, browse, multiple, or extended
  default: ?

-shadow
  Type of shadow of the list.
  type: none, in, out, etchedIn, etchedOut
  default: none

-children
  A list of rows each member containing a list of column entries.
  type: list
  default: ""

-titles
  List of strings which are used as titles for the columns.
  type: list
  default: ""

-justifications
  Justification for each column.
  type: list of left, right, center, fill
  default: center

-titlesShow
  Determines whether the titles are shown.
  type: boolean
  default: true

-columnClicked
  Command to be executed, whenever a title of a column is clicked. The column titles are only active if columnClicked is not "".
  Before evaluating every percent (%) and its following character is substituted in selectionChanged:

  %% | by %
  ,
  %c | by the number of the column selected
  %wby the widget-ID

  type: string
  default: ""

-selectionChanged
  Command to be executed, whenever the selection changes.
  Before evaluating every percent (%) and its following character is substituted in selectionChanged:

  %% | by %,
  %b | by the number of the button that was pressed or released
  %c | by the number of the column selected
  %r | by the number of the row selected
  %s | by 1 if the row is selected and by 0 if the row is not selected
  %t | by the event type
  %w | by the widget-ID

  type: string
  default: ""

-scrollbar
  What type of scrollbar the list should have. This can also be a list of two values where the first value is the type of the horizontal scrollbar and the second value is the type of the vertical scrollbar. Also possible is a boolean value understood by tcl where true is a synonym for always and false is a synonym for never.
  type: always, never, automatic
  default: automatic

## DESCRIPTION

## WIDGET COMMANDS

The clist command creates a new Tcl command whose name is an ID returned on widget creation. This command may be used to invoke various operations on the widget. It has the following general form:
ID option ?arg arg ...?
option and arg determine the exact behavior of the command. The following commands are possible for clist widgets:

ID getSelection
  Returns list of selected rows.

ID getCellText row column
  Returns text of one cell.

ID select list-of-rows ?-option optionVal ...?
  Select rows.

ID sort column ?-option optionVal ...?
  Sort all rows based on text in column column. Valid options are
  -reverse boolean
  -command func

ID columnConfigure column ?-option optionVal ...?
  Valid options are:
  -titleActive boolean
  -title string
  -justification string
  -visible boolean
  -resizeable boolean
  -autoResize boolean
  -width integer
  -minWidth integer
  -maxWidth integer

ID add list-of-rows
  Add new rows after all existing rows.

ID addEnd widgetList
  Synonym for add.

ID addBegin widgetList
  Same as add but adds rows before all existing rows.

## KEYWORDS

Copyright © 2001 - 2002 P. G. Baum