1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58
|
xdel();
clear();
fen = scf(0);
fen.background = -2;
fen.figure_position = [0 0];
fen.figure_name = gettext("Tondeuse");
m=get(0, "screensize_px")
fen.axes_size = [m(3) m(4)-100];
z="";
// Remove Scilab graphics menus & toolbar
toolbar(fen.figure_id,"off");
xsetech([0, 0, 1, 0.9]);
res="";
function demande()
n=12; //test
while n<3
n=evstr(x_dialog("Nombre de points (au minimum 3 et un entier):","0"))
if n<>int(n) then
n=0;
end
end
dem = scf(1);
params = ["n°" "Abscisse (m)" "Ordonnée(m)" ];
num = string((1:n)');
listex = string(zeros(n,1));
listey = string(zeros(n,1));
table = [params; [ num listex listey ]]
toolbar(dem.figure_id,"off");
ut = uicontrol(dem,"style","table",..
"string",table,..
"position", [0, 0, dem.axes_size],..
"tooltipstring","Données du terrain")
bt = uicontrol("style", "pushbutton",...
"string","OK",...
"units", "normalized",...
"position", [0, 0, 0.1, 0.05],...
"userdata",ut,...
"callback", ("h=gcbo.userdata(1);res=(get(h(1),''string''));"));
endfunction
btnew = uicontrol("style", "pushbutton",...
"string","Rentrer les coordonnées du terrain",...
"units", "normalized",...
"position", [0, 0, 0.1, 0.05],...
"callback", "demande()");
res |
Partager