From: pedro moreno on 26 Jul 2010 15:32 Well, actually I don't understand very well the responses... but I still hope that some can give me a solution/idea for my problem... because http://www.mathworks.com/matlabcentral/fileexchange/24861-41-complete-gui-examples is a web with advanced code, and my software is easier... My code (the wrong solution that I had through), from GUI_1: GUI_1: function pushbutton_Callback(hObject, eventdata, handles) gui2; %it returns GUI_2 load('acept_cancel.mat'); if b_Acept set(handles.pushbutton2,'BackgroundColor',[0 1 0]); %green colour %else, it keeps the default grey colour end GUI_2: function pushbutton1_Callback(hObject, eventdata, handles) %Button ACEPT b_Acept= true; save('acept_cancel.mat',b_Acept); close; function pushbutton2_Callback(hObject, eventdata, handles) %Button CANCEL b_Acept= false; save('acept_cancel.mat',b_Acept); close; It doesn't work because firstly the file acept_cancel.mat doesnt exist, my idea is that it was created only in the execution, and it dissapeared at the end. ¿Any idea? thx in advance, and sorry for my voluptuous prose again ;)
|
Pages: 1 Prev: remember pushbutton state of internal GUI Next: remember pushbutton state of internal GUI |