|
Contents | Previous | Next | Subchapters |
| See Also | textfield |
addcontrol(caption, geometry, "label", text)
Adds a "label" control,
with the specified
geometry
,
to the Dialog window specified by
caption
.
The character row vector text specifies the text
that is initially placed in the label control.
The return value is the
handle
for the label control.
setcontrol(handle, text)
Changes the text displayed in the "label" control specified by
handle to the value specified text, where
handle is the value returned by addcontrol
when the "label" control was created and text is
a character row vector.
The return value of setcontrol is true,
if the control can be set as requested, and false otherwise.
clear
#
Caption = "Test Dialog"
geometry = [100, 100, 200, 100]
callback = "delwin(Caption);"
adddialog(Caption, geometry, callback);
#
geometry = [20, 20, 100, 20]
text = "Line one"
addcontrol(Caption, geometry, "label", text);
#
geometry = [20, 40, 100, 20]
text = "Line two"
handle = addcontrol(Caption, geometry, "label", text);
#
sleep(3)
setcontrol(handle, "Line 2");