how to create a clear all push button on GUI matlab
5 views (last 30 days)
Show older comments
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.
0 Comments
Answers (1)
Image Analyst
on 31 Aug 2016
Edited: Image Analyst
on 31 Aug 2016
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);
See Also
Categories
Find more on Get Started with MATLAB in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!