|
"Sabu" <afshanj@gmail.com> wrote in message
news:21447460.1890.1335708505375.JavaMail.geo-discussion-forums@ynen8...
> Hi ALl,
>
> I am very new in this topic. used to do programming with .Net languages
> but don't know anything about Matlab.
> I have created a form with one push button and a text bod. I wanna hide
> text box when pushbutton is pressed. but this doesn't work
> "set(text2,'Visible','off');
> text2 is the tag of text box. could you tell me what should be changed
> here? should I actually use the 'tag' as a reference to the object?
The SET function expects its first input to be the _handle_ of the object
whose property you want to set, not the _Tag_ of that object. If you're
using GUIDE to create your GUI, the handles structure that MATLAB
automatically passes into the callback function should contain the handle of
this object in a field named text2.
set(handles.text2, 'Visible', 'off')
--
Steve Lord
slord@mathworks.com
To contact Technical Support use the Contact Us link on
http://www.mathworks.com
|