필터 지우기
필터 지우기

how to create a clear all push button on GUI matlab

조회 수: 5 (최근 30일)
ahmed lamak
ahmed lamak 2016년 8월 31일
댓글: ahmed lamak 2016년 8월 31일
i have created a push button but what code do i need to use in order to clear all of the other inputs the user may have inputted.
function reset_Callback(hObject, eventdata, handles)
% hObject handle to reset (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
This is my current push button code on matlab
I have six edit text boxes for the user to input data into the GUI, they are called input1_editText,..., input6_ediText.
I would like to have a push button which resets all of these edit text boxes back to 0.

답변 (1개)

Image Analyst
Image Analyst 2016년 8월 31일
편집: Image Analyst 2016년 8월 31일
Just assign them then use guidata
handles.input1_editText.String = ''; % Null
handles.input2_editText.String = '0';
handles.input3_editText.String = 'Enter something';
guidata(hObject, handles);
  댓글 수: 1
ahmed lamak
ahmed lamak 2016년 8월 31일
when you say just assign them, what do you mean? i've copied and pasted the above into my GUI code and the push button doesnt seem to do anything

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

카테고리

Help CenterFile Exchange에서 Get Started with MATLAB에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by