Navigation

Operators and Keywords

Function List:

C++ API

Function File: s = zenity_list(title, columns, data, options1, ...)

Displays a graphical list of data. The variable title sets the title of the list. The variable columns must be a cell array of strings of length N containing the headers of the list. The variable data must be cell array of strings of length NxM containing the data of the list.

The code

          zenity_list("Age versus Height", {"Age", "Height"},
          {"10", "20"; "120cm", "180cm"})

produces a list of the data. The user can select a row in the table, and it's first value will be returned by the function when the user closes the window.

It's possible to alter the behaviour of the list window by passing more than three arguments to the funtion. Theese optional string arguments can be

checklist
The first row in the list will be a check box. The first value of each data row must be either "TRUE" or "FALSE".
radiolist
The first row in the list will be a radio list. The first value of each data row must be either "TRUE" or "FALSE".
editable
The values of the list will be editable by the user.
A numeric value
The value returned by the function will be the value of this column of the user selected row.
all
The value returned by the function will be the entire row selected by the user.