there should be a tag associated with the static text. default is "handles.text1", it doesn't create functions like the other uicontrols since it is usually just used as static text. so i am not sure what you're accomplishing with the set(hObject....) within the text box as that would turn the text box visibility off.
i created a simple GUIDE gui with a button and a static text field (set property value to be visible off). Then i put
set(handles.text1,'visible','on')
under the button callback.
Running this simple gui, i can turn the static text field to be visible when i push the button.
example of my test gui containing just a static text with tag text1 and a pushbutton1.
function pushbutton1_Callback(hObject, eventdata, handles)
status = get(handles.text1,'visible');
switch status
case 'on'
set(handles.text1,'visible','off');
case 'off'
set(handles.text1,'visible','on');
end
Best Answer