Got Questions? Get Answers.
Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

Thread Subject:
Remove the String of Static text in guide

Subject: Remove the String of Static text in guide

From: Mohammad Zahid

Date: 31 Mar, 2011 22:08:04

Message: 1 of 3

Hi...
I have create a guide with push button and static text, when i push the button, static text will show 'Hello'.

My coding is just setting the handles to the text:
set(handles.greeting,'String','Hello');

by click on the pushbutton, Hello will come out in static text.
what should i do if i want to clear the string?

Subject: Remove the String of Static text in guide

From: Jeremy

Date: 31 Mar, 2011 23:19:05

Message: 2 of 3

Is this what you mean:

set(handles.greeting,'String','');

That will clear the static text by making the string empty.

Otherwise,

set(handles.greeting,'visible','off');

will make it disappear.

Subject: Remove the String of Static text in guide

From: Mohammad Zahid

Date: 1 Apr, 2011 01:52:04

Message: 3 of 3

"Jeremy " <jeremy.brower@asu.edu> wrote in message <in3259$bc7$1@fred.mathworks.com>...
> Is this what you mean:
>
> set(handles.greeting,'String','');
>
> That will clear the static text by making the string empty.
>
> Otherwise,
>
> set(handles.greeting,'visible','off');
>
> will make it disappear.

Thanks Jeremy,
Actually, i'm using else if function, i want to use another push button to clear the text, for the 1st click pushbutton'Say' to show Hello, then click another pushbutton 'clear' to clear the Hello. then click pushbutton'Say' again to show Bonjour.
here my coding:

if greeting <= 0
   set(handles.greeting,'String','Hello');
else greeting >= 1
       set(handles.greeting,'String','Bonjour');
end


can i clear the text?

Tags for this Thread

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.

Contact us