tkgui Function
Last update : 22/2/2006
tk_choices - tk dialog allowing multiple choices
Calling Sequence
- rep=tk_choices(title,labels,choices,defaults,align)
- rep=tk_choices(title,labels,choices,defaults)
- rep=tk_choices(title,labels,choices)
- rep=tk_choices(title,choices)
- rep=tk_choices(choices)
Parameters
-
title : vector of strings, title for the popup window.
-
labels : vector of strings, the labels for each row of the radio buttons.
-
default : default choices, if none is given, it's assumed to be the
first item.
-
choices : list of string vectors. The elements of the list give the
possible choices.
-
align : boolean, whether the items in different rows should be aligned.
-
rep : an integer vector which gives for each item the number of the
selected toggle. If user exits dialog with "cancel"
button rep is set to [].
Description
Similar to tk_choose. But this dialog allow multiple choices at the same
time using radio buttons. Selections are returned in rep as the number of
the selected items.
Type tk_choices() to see examples.
Examples
r1=['toggle c1','toggle c2','toggle c3'];
r2=['toggle d1','toggle d2','toggle d3'];
r3=['toggle e1','toggle e2'];
rep=tk_choices(list(r1,r2,r3));
rep=tk_choices('toggle menu', list(r1,r2,r3));
rep=tk_choices('toggle menu', ['row 1','row 2','row 3'], ...
list(r1,r2,r3), [1,1,1] %f);
See Also
x_choices, tk_choices1,