|
Contents | Previous | Next | Subchapters |
| See Also | listbox |
addcontrol(caption, geometry, "multilist", list)
addcontrol(caption, geometry, "multilist", list, call back)
Adds a "multilist" control,
with the specified
geometry
,
to the window specified by
caption
.
The geometry specifies the size of the multi-selection list.
The character matrix list specifies the choices in the list.
The command specified by
call back
is executed whenever the current selection
in the list is changed by the user.
The return value is the
control handle
for the
multilist selection box.
getcontrol(handle)
Returns the current section in the "multilist" control specified by
handle, where
handle is the value returned by addcontrol
when the "multilist" control was created.
The return value is a logical column vector with the
same row dimension as list in the corresponding
call to addcontrol.
setcontrol(handle, list)
Changes the list of choices in the "multilist" control specified by
handle to the list specified by list, where
handle is the value returned by addcontrol
when the "multilist" control was created and list is
a character matrix.
The return value of setcontrol is true, if the
control can be set as requested, and false otherwise.
clear
#
caption = "Multi List Box Example"
geometry = [100, 100, 250, 200]
callback = "delwin(caption);"
adddialog(caption, geometry, callback);
#
geometry = [10, 10, 140, 100]
list = {"One", "Two", "Three"}
Handle = addcontrol(caption, geometry, "multilist", list )
#
geometry = [35, 145, 90, 20]
name = "Print"
callback = "Print"
addcontrol(caption, geometry, "pushbutton", name, callback);
#
function Print() begin
global Handle
print getcontrol(Handle)'
end