From: Eyal Fleminger on
Here comes the next chapter in my struggles with static text labels.

I have two static text labels, and which are both placed in a uipanel which serves as the background. I would like the (vertical) center of the text on both labels to be aligned to each other - which I've accomplished - and to the center of the uipanel. However, the text in the static text label is not necessarily (even when I set the height to the minimum as calculated by the Extent property) the same as the center of the uicontrol. Is there any way to set the vertical alignment of the string inside the uicontrol rectangle? Alternatively, is there some way to check what the "margins" are above and below the string, so that I can calculate the necessary modications to the labels' Position property?
From: Jan Simon on
Dear Eyal!

> I have two static text labels, and which are both placed in a uipanel which serves as the background. I would like the (vertical) center of the text on both labels to be aligned to each other - which I've accomplished - and to the center of the uipanel. However, the text in the static text label is not necessarily (even when I set the height to the minimum as calculated by the Extent property) the same as the center of the uicontrol. Is there any way to set the vertical alignment of the string inside the uicontrol rectangle? Alternatively, is there some way to check what the "margins" are above and below the string, so that I can calculate the necessary modications to the labels' Position property?

It is necessary to mention the Matlab version for this question.
If you have access to Matlab 6.5... :-)

Setting the vertical alignment of TEXT objects is much easier than using UICONTROL('Style', 'text'). Just a tip.

Jan
From: Eyal Fleminger on
"Jan Simon" <matlab.THIS_YEAR(a)nMINUSsimon.de> wrote in message <hhqg3k$hce$1(a)fred.mathworks.com>...
> Dear Eyal!
>
> > I have two static text labels, and which are both placed in a uipanel which serves as the background. I would like the (vertical) center of the text on both labels to be aligned to each other - which I've accomplished - and to the center of the uipanel. However, the text in the static text label is not necessarily (even when I set the height to the minimum as calculated by the Extent property) the same as the center of the uicontrol. Is there any way to set the vertical alignment of the string inside the uicontrol rectangle? Alternatively, is there some way to check what the "margins" are above and below the string, so that I can calculate the necessary modications to the labels' Position property?
>
> It is necessary to mention the Matlab version for this question.
> If you have access to Matlab 6.5... :-)
>
> Setting the vertical alignment of TEXT objects is much easier than using UICONTROL('Style', 'text'). Just a tip.
>
> Jan

Hello Jan

I'm using Matlab 2008a
 | 
Pages: 1
Prev: Analog to Digital Converter
Next: multiple bvp4c?