필터 지우기
필터 지우기

GUI built with GUIDE (placing a pushbutton into switch case statements)

조회 수: 1 (최근 30일)
StevieNewRoad
StevieNewRoad 2013년 10월 29일
댓글: StevieNewRoad 2013년 10월 30일
I have a GUI with some text boxes for entering printing parameters and a popup menu with 5 different options. When an option is selected from the popup I would like the program to pause whilst a user fills in the relevant textboxes for that popup option. Once the user has finished I would like them to press a pushbutton to resume the program and plot the figure.
I have used a switch statement with 5 cases for the popup. My code works as planned except that I am having trouble pausing the program whilst the user enters parameters into the relevant textboxes.
I have toyed with uiwait and uiresume, but I am having trouble calling the push button to resume the program to each case statement.
% --- Executes on button press in generate.
function generate_Callback(hObject, eventdata, handles)
uiresume
This is the code, hopefully you can get a feel for what I am trying to do:
waiting= str2double(get(handles.generate,'ButtonDownFcn'));
if ~isempty(waiting)
uiwait
else
uiresume
end
Any help would be much appreciated
Steve
  댓글 수: 1
StevieNewRoad
StevieNewRoad 2013년 10월 30일
I have managed to solve my own question.
I realised that I have to take the plot code out of the user selection popup and create a button for plotting with its own switch statement to select the required plot.
Cheers
Steve

댓글을 달려면 로그인하십시오.

답변 (0개)

카테고리

Help CenterFile Exchange에서 Migrate GUIDE Apps에 대해 자세히 알아보기

태그

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by