tk_choose           Jan 2001           Ying-Wan Lam           tkgui Function
NAME
tk_choose - replacement of x_choose, interactively choosing from items.
CALLING SEQUENCE
[num]=tk_choose(items,title,buttons,multiple,nview)
[num]=tk_choose(items,title,buttons,multiple)
[num]=tk_choose(items,title,buttons)
[num]=tk_choose(items,title)
[num]=tk_choose(items)
PARAMETERS
-
items
: column vector of string or numbers, items to choose from
-
title
: column vector of string, comment for the dialog
-
button
: string vector with two elements, text to appear in the button. Default values are ['ok', 'cancel'].
-
multiple
: boolean, default value is %f. If set %t, multiple items can be chosen.
-
nview
: integer, limit the size of the listbox. The listbox can approximately display nview items.
-
num
: number vector, choosen item number(s) or 0 if dialog resumed with "cancel" button.
DESCRIPTION
Returns in num the number(s) of the chosen item(s). Type tk_choose() to see examples.
EXAMPLE
n=tk_choose(['item1';'item2';'item3'],['that is a comment';'for the dialog'],'',%t)
n=tk_choose(['item1';'item2';'item3'],['that is a comment'],['accept', 'reject'])
SEE ALSO
x_choose, tk_choices, tk_dialog