unable to make invisible for edit box in gui.

조회 수: 1 (최근 30일)
sermet OGUTCU
sermet OGUTCU 2021년 8월 19일
답변: Adam Danz 2021년 8월 19일
I have a GUI. In this GUI, I created an empty edit text. I need to make invisible this edit text. I appended the following code at the edit1_Callback function as follows:
function edit1_Callback(hObject, eventdata, handles)
% hObject handle to edit1 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
% Hints: get(hObject,'String') returns contents of edit1 as text
% str2double(get(hObject,'String')) returns contents of edit1 as a double
set(handles.edit1,'Visible','off')
It doesn't make edit box invisible. How I can make invisible to edit box in my GUI?
  댓글 수: 2
Adam Danz
Adam Danz 2021년 8월 19일
When should the edit box become invisible? You're making it invisible within the edit1_callback fcn which presumably executes when a users changes the edit field. Does that make sense, to make the field invisible as soon as the user edits it?
Is there an error message or warnings? Is the callback being executed? Does anything observable happen?
sermet OGUTCU
sermet OGUTCU 2021년 8월 19일
I have also two radio button in this GUI. For example, when users choose radiobutton1, this edit box should be invisible. Could you give me an example code for doing this.

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

채택된 답변

Adam Danz
Adam Danz 2021년 8월 19일
> when users choose radiobutton1, this edit box should be invisible
Then you need to move your line of code from the edit1_Callback function to the radio button callback function.

추가 답변 (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