tkgui Function
Last update : 22/2/2006
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.
Examples
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,