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
| %fonction principale
function afficher_un_texte_bidon
%Création de l'objet figure
figure('units','pixels',...
'position',[150 150 450 250],...
'numbertitle','off',...
'name','',...
'menubar','none',...
'tag','interface');
%Création de l'objet pushbutton select_band
uicontrol('style','pushbutton',...
'units','normalized',...
'position',[0.1 0.60 0.22 0.1],...
'string','Afficher texte bidon',...
'callback',@aff_texte,...
'tag','pushbuttonafficher');
%Création de l'objet texte bidon
uicontrol('style','text',...
'units','normalized',...
'BackgroundColor',[215 241 236] ./ 255,...
'position',[0.1 0.75 0.5 0.05],...
'string','Texte bidon',...
'HorizontalAlignment','left',...
'tag','bidon',...
'visible','off');
%sous-fonction aff_texte
function aff_texte(obj,event)
h = findobj('tag','bidon');
setappdata(h,'visible','on');
getappdata(h,'visible') |
Partager