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
| function Console()
figure('Position',[400 400 894 420]);
%% Création de la zone texte éditable
uicontrol('style','list',...
'units','normalized',...
'HorizontalAlignment','left',...
'visible','on',...
'FontSize',13,...
'Enable','inactive',...
'BackgroundColor',[1 1 1],...
'Max',2,...
'tag','Fenetre',...
'position',[0.04 0.12 0.23 0.2]);
uicontrol('style','pushbutton',...
'units','normalized','Position',[0.04 0.8 0.23 0.1],'String','No Problem','Callback',@Aucune_erreur);
uicontrol('style','pushbutton',...
'units','normalized','Position',[0.04 0.6 0.23 0.1],'String','Problem','Callback',@Erreur);
set(findobj('Tag','Fenetre'),'String',{datestr(now) 'Start'});
function Nouvelle_entree(Nouvelle_ligne)
set(findobj('Tag','Fenetre'),'string',[Nouvelle_ligne {get(findobj('Tag','Fenetre'),'string')}]);
end
function Aucune_erreur(obj,event)
Nouvelle_entree({datestr(now) 'Aucune erreur'});
end
function Erreur(obj,event)
Nouvelle_entree({datestr(now) '<HTML><FONT color="red">Erreur</Font></html>'});
end
end |
Partager