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:
Can't resize GUIDE static text box

Subject: Can't resize GUIDE static text box

From: Greg

Date: 17 Jul, 2013 17:52:06

Message: 1 of 3

In GUIDE, I placed a static text control in my figure window. Then, using the string editor in the property inspector, I entered six lines of text. (The lines of text don't change when the program is running, which is why I'm setting them through the inspector.) Each line of text is short - say one word. All six lines appear correctly in the text box in the GUI designer, but the box is very wide. It has the six words on the left side of the box and then the remainder of the box is blank. The problem is that I can't shrink the box by dragging the handle on the right side of the box leftward. When I click on the handle the box gets outlined but then nothing happens when I drag the handle to the left. The same thing happens if I try to drag the left handle to the right.

I think the text box is seeing the six lines as one line and setting the width of the box to contain that one line because if I delete a line, I _can_ then resize the box by the length of the word in the deleted line.

Any suggestions? I have R2012b.

Thanks.
Greg Reese

Subject: Can't resize GUIDE static text box

From: matt dash

Date: 17 Jul, 2013 20:40:31

Message: 2 of 3

"Greg" wrote in message <ks6lk6$6kq$1@newscl01ah.mathworks.com>...
> In GUIDE, I placed a static text control in my figure window. Then, using the string editor in the property inspector, I entered six lines of text. (The lines of text don't change when the program is running, which is why I'm setting them through the inspector.) Each line of text is short - say one word. All six lines appear correctly in the text box in the GUI designer, but the box is very wide. It has the six words on the left side of the box and then the remainder of the box is blank. The problem is that I can't shrink the box by dragging the handle on the right side of the box leftward. When I click on the handle the box gets outlined but then nothing happens when I drag the handle to the left. The same thing happens if I try to drag the left handle to the right.
>
> I think the text box is seeing the six lines as one line and setting the width of the box to contain that one line because if I delete a line, I _can_ then resize the box by the length of the word in the deleted line.
>
> Any suggestions? I have R2012b.
>
> Thanks.
> Greg Reese

Have you tried double clicking it and then directly entering the desired position property? If all else fails you can set the position property in your opening_fcn

Subject: Can't resize GUIDE static text box

From: Greg

Date: 18 Jul, 2013 12:38:10

Message: 3 of 3

> Have you tried double clicking it and then directly entering the desired position property?

I tried your suggestion with the size (which is what I actually want to change) and it worked. Thanks Matt.
Greg Reese

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