VtDrawnListSetItem(VTCL)

VtDrawnListSetItem(VTCL)


VtDrawnListSetItem -- replace contents of item in drawn list

Syntax

VtDrawnListSetItem drawnlist_widgetName [options]

Description

Replaces the contents of an item in a DrawnList (specified with either -field or -position) with the new item given in -fieldList.

Options

-field column matchStr (NA)
Selects a field to set based on a match of columns of data. For example, if your list contains:
{0 1 "String one"}
{0 1 "String two"}  
{0 1 "String three"}
specifying -field 2 "String one" would match item 1.

-fieldList list (C)
Sets a row of data for the DrawnList. The default formatting is used on the list if you do not specify -formatList in the command.

For example:

   ...
   -formatList {{ICON 2} {STRING 20} {STRING 15}}  \
   -fieldList  [list 1 "John Doe" "555-1212"]
   ...

-formatList list (CS)
Describes the columns used in the DrawnList. This field contains a list of column descriptions. Each column description in turn is a list containing the column type, the column width, and the column's left and right margins. The syntax is:
{ TYPE WIDTH [Left Margin, Right Margin] }
The left and right margins are optional parameters. The following specifies a column that is of type ICON, with a width of 1 icon and a left and right margin of 5 pixels:
{ ICON 1 5 5 }
Valid types are ICON, STRING, and DATA. DATA does not display on the screen; it is used to store item-specific data.

-position integer (NA)
Sets an item by list position. (The base position is 1. To indicate the last item on the list, use 0.)
When specifying an icon index in -fieldList or -recordList the following indexes can be used to reference connection icons or no icons:

CONNECT_L
CONNECT_I
CONNECT_T
NO_ICON

For example:

...
VtDrawnListAddItem $lst \
    -formatList {{ICON 5} {STRING 20 5}} \
    -fieldList {"CONNECT_I NO_ICON 1 CONNECT_H  2" "Multiple icons" }