Thread Subject: Frame on uicontrol "text"

Subject: Frame on uicontrol "text"

From: Luigi Giaccari

Date: 10 Jul, 2009 19:12:02

Message: 1 of 5

Does anybody know how to add a frame to an uicontrol "text" object?

I added the background color (red), I'd like to have a green or black frame but I don't know how to add it.

Thanks for even reading.

Subject: Frame on uicontrol "text"

From: Nathan

Date: 10 Jul, 2009 19:26:10

Message: 2 of 5

On Jul 10, 12:12 pm, "Luigi Giaccari" <giaccarilu...@msn.com> wrote:
> Does anybody know how to add a frame to an uicontrol "text" object?
>
> I added the background color (red), I'd like to have a green or black frame but I don't know how to add it.
>
> Thanks for even reading.

You mean the EdgeColor?

An example from text documentation:
text(3*pi/4,sin(3*pi/4),...
'\leftarrowsin(t) = .707',...
'EdgeColor','red');


http://www.mathworks.com/access/helpdesk/help/techdoc/index.html?/access/helpdesk/help/techdoc/ref/text_props.html

-Nathan

Subject: Frame on uicontrol "text"

From: Luigi Giaccari

Date: 10 Jul, 2009 20:40:20

Message: 3 of 5

Thank you for your reply,

I intend the "text" properties from uicontrol, not the one from figures.




I'll be more specific what I need is:

uitext=uicontrol('style','text',...
    'units','pixels',...
    'fontsize',8,...
    'String','String',...
    'Backgroundcolor',[1 0 0]);


The edgecolor is not supported.


Thank you the same

Subject: Frame on uicontrol "text"

From: Matt Fig

Date: 10 Jul, 2009 21:01:03

Message: 4 of 5

Is this what you mean?




figure('un','pix','pos',[400 400 300 130],'menub','n','resize','of');
uicontrol('sty','fr','un','pix','pos',[20 20 260 90],'backg',[.2 .9 .4]);
uicontrol('sty','tex','un','pix','pos',[24 24 252 82],'backg',[.8 .2 .2],...
          'stri',{' ','Here''s a text box'},'fonts',15 );

Subject: Frame on uicontrol "text"

From: Luigi Giaccari

Date: 10 Jul, 2009 22:24:01

Message: 5 of 5

Interisting solution that fits perfectly what I mean.

I deduce there is no straight solutions like a "frame property" or something similar.

Drawing a rectangle behind every text box may too much rough but I'll do it.


Thank you very much Matt

Tags for this Thread

Everyone's Tags:

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.

Tag Activity for This Thread
Tag Applied By Date/Time
gui Luigi Giaccari 10 Jul, 2009 15:14:02
uicontrol Luigi Giaccari 10 Jul, 2009 15:14:02
text Luigi Giaccari 10 Jul, 2009 15:14:02
frame Luigi Giaccari 10 Jul, 2009 15:14:02
color Luigi Giaccari 10 Jul, 2009 15:14:02
rssFeed for this Thread

Contact us at files@mathworks.com