Thread Subject:
Static text box

Subject: Static text box

From: Sabu

Date: 29 Apr, 2012 14:08:25

Message: 1 of 2

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?

thanx

Subject: Static text box

From: Steven_Lord

Date: 30 Apr, 2012 15:00:19

Message: 2 of 2



"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

Tags for this Thread

Add a New Tag:

Separated by commas
Ex.: root locus, bode

What are tags?

A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.

Anyone can tag a thread. Tags are public and visible to everyone.

rssFeed for this Thread

Contact us