VtDrawnListAddItem


Add an item to a DrawnList

Syntax

VtDrawnListAddItem drawnlist_widgetName [options]

Description

Adds an item to the DrawnList. If you do not specify a position VtDrawnListAddItem will append it to the end of the list.

Options

-fieldList list (C)
Specifies a row of data for the DrawnList. Default formatting is used unless an alternative format is supplied using the -formatList option.

For example:

VtDrawnListAddItem $dlist \
          -formatList {{ICON 2} {STRING 20} {STRING 15}}  \
          -fieldList  [list 1 "Orange" "Fruit"]

-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's type, width, and left and right margins. The syntax is:
{ type width [left_margin, right_margin] }

The left_margin and right_margin parameters are optional. The following specifies a column that is of type ICON, with a width of 1 icon width and a left_margin and right_margin of 5 pixels:

{ ICON 1 5 5 }

Valid types are ICON, STRING, and DATA. DATA is not displayed on the screen; it is used to store item specific data.

For example:

-formatList { {ICON 3} {STRING 20 5} {DATA} }

The first column is an icon field with a width of 3, the second column contains a string with a width of 20 and a left margin of 5, the third column contains hidden data.

-itemBorder NONE | ONOFFDASH | DOUBLEDASH | SOLID (CS)
Specifies the type of border used around a DrawnList item.

-overrideFont string (CS)
Sets the font of the drawnlist item to one of the symbolic font names defined in the IXI Visual Tcl application resource file. Pre-defined symbols are:

-position integer (NA)
Specifies that the item which is selected by default in the DrawnList is the item at position integer. The base position is 1. To indicate the last item on the list, use 0.

-recordList list_of_lists (C)
Specifies one or more rows of data for the DrawnList. For example:
{ { 0 1 "Apple" "Fruit"} 
  { 1 1 "Kumquat" "Fruit"} 
  { 1 3 "Leek" "Vegetable"}
}

For information about using connection icons, refer to the VtDrawnList manual page.