GUi to wait for events from one of two push buttons
10 visualizzazioni (ultimi 30 giorni)
I have designed a GUI which is taking some images iteratively from a folder and displays it. I have two push buttons "Save" and "Dont Save" which either save(or not) some information about the data.
Since I am reading the data iteratively, all the images are displayed continuously without waiting for a response from the user. I want the GUI to wait for a event to occur in one of the two push buttons and to perform the respective action.
Dishant Arora il 3 Apr 2014
Modificato: Dishant Arora il 3 Apr 2014
You can store file names in the handles structure and do something like this:
function gui_OpeningFcn(hObject, eventdata, handles, varargin)
handles.Counter = 1;
guidata(hObject , handles);
function pushbutton1_callback(hObject, eventdata, handles)
function updateCounter(hObject, handles)
% Your code to read , display and write image.
handles.Counter = handles.Counter+1;