[Scilab-users] uicontrol & wiki

paul.carrico at free.fr paul.carrico at free.fr
Tue Dec 20 21:45:40 CET 2016


Hi

I've been looking to the wiki and an interesting article speaking about
GUI developments
(https://fr.wikibooks.org/wiki/Découvrir_Scilab/Créer_une_interface_graphique_GUI
- in French language). 

I've a naive question on the code hereafter: why is it possible to
implement several values? no loop is needed nor any breack condition ...
surprising but I do not understand :-) (naive question I confess) 

Thanks 

Paul 

ps: implement a value in the bottom left box and  click on the
pushbutton x^2

###############################################"

mode(0)

f = scf(0);
e = uicontrol(f, "style", "edit", ...
"position", [0 0 100 20]);
t = uicontrol(f, "style", "text", ...
"position", [200 0 100 20], ...
"string", "...");
b = uicontrol(f, "style", "pushbutton", ...
"string", "$x^2$",...
"position", [100 0 100 20], ...
"callback", "x = evstr(e.string);...
y = x^2;...
t.string = string(y);...
plot2d(x, y, style = -1);");
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.scilab.org/pipermail/users/attachments/20161220/e7f39f2c/attachment.htm>


More information about the users mailing list