#
Prev |  | Next

# list

## Name

list -- A widget which displays text or other items arranged in rows and columns.

## Synopsis

list [`-option` `value`...]

## Screenshot

## Description

The list widget is basically a tree widget where rows cannot have children. Therefor the list command has the same options as the tree command.

## Example

    set list [gnocl::list -titles {"bool" "string" "integer" "float"} -types {boolean string integer float} -children {{1 "box" 345 4.546} {0 "text" 123 5.79}}]
    $list add {{0 "list" -104 1.45} {1 "window" 3350 9.58}}
    $list columnConfigure 2 -onCellData "setColor %v"
    proc setColor { val } {
       if { $val < 0 } {
          return "-foreground red"
       }
       return "-foreground blue"
    }
    gnocl::window -title "List" -child $list -defaultWidth 250 -defaultHeight 120

results in

## See also

tree, `GtkListView`, `GtkListStore`

Prev | Home | Next
tree | Up | eventBox