I have a GUI where the user would input their name, then press a button to proceed to the next GUI.
I want to make it so that if they leave the textbox blank and try to proceed by pressing the OK push button, they get an error dialog message prompting them to enter a name. It does not seem to work here. How would I accomplish this? Input is much appreciated.
The first line of the function is from the GUIDE output for .m file figure formation (as usual).
function pushbutton1_Callback(hObject, eventdata, handles) editString = get(handles.edit1, 'String'); if editString == ''; % Enter in blank?
errordlg('Please enter a name into the text-box. We thank you in anticipation.','Error Code I'); else gui2 close gui1 end
Best Answer