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
|
function essai_affichage
handles(1)=figure('units','pixels',...
'position',[250 250 700 700],...
'color',[0.925 0.913 0.687],...
'numbertitle','off',...
'name','[GUI] Utilisation des variables globales',...
'menubar','none',...
'tag','interface');
handles(2)=uicontrol('style','pushbutton',...
'units','normalized',...
'position',[0.1 0.1 0.1 0.05],...
'string','action',...
'callback',@afficher,...
'tag','action');
handles(3)=uicontrol('style','edit',...
'units','normalized',...
'position',[0.1 0.2 0.4 0.7],...
'string','',...
'HorizontalAlignment','left',...
'max',300,...
'enable','inactive',...
'tag','resultat');
function afficher(obj,event)
content=fileread('essai.m');
set(handles(3),'string',content);
end
end |
Partager