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

True Justification (start and end in the static text margins)

Asked by Alfonso on 10 May 2013

Hello,

I have a static text I have to show in one gui, and i need it to have a true justification, i mean the text must start and end in the static text margins in left and in right, but i cant find any Uicontrol Properties :

http://www.mathworks.es/es/help/matlab/ref/uicontrol_props.html#bqxoims

that helps me and :

http://www.mathworks.com/matlabcentral/newsreader/view_thread/282845

didn't help too.

Anyone has tried this?.

Thank you in advance.

Alfonso.

0 Comments

Alfonso

Products

No products are associated with this question.

2 Answers

Answer by Alfonso on 14 May 2013

0 Comments

Alfonso
Answer by Walter Roberson on 14 May 2013

There is no uicontrol() property for that. I do not know if it could be done by accessing the underlying Java.

That kind of justification is only done for proportionally spaced fonts, and is achieved by adding extra spacing in between words. MATLAB does not provide any tools for placement of characters at specific pixel boundaries within labels of uicontrol.

The closest to that would be to switch your axes so that its units was Pixels, adjust the axis Position and xlim and ylim so that one data unit corresponds to one pixel, and then to text() every single character into place individually (_not_ using uicontrol.)

0 Comments

Walter Roberson

Contact us