LabVIEW Idea Exchange

cancel
Showing results for 
Search instead for 
Did you mean: 
ouadji

Lock text in center

Status: New

 

                                                           "  lock text in center  "

 

alpha.png

 

 

                                        ... sorry ..  but the text is not in center

 

                  A > B , and the difference is greater than one pixel

 

 

                        ext.png

5 Comments
Darin.K
Trusted Enthusiast

Make one small change and you can see what is happenning:

 

LockTextInCenter.png

vitoi
Active Participant

To me, the centre line should be in the centre of the text. That is, half way between the top of the "t" and bottom of the "t".

 

Perhaps an example in CAPITAL letters would help.

 

I've also noticed this annoying off-centre behaviour. Kudos.

 

 

 

AristosQueue (NI)
NI Employee (retired)

> To me, the centre line should be in the centre of the text.

 

No. That would cause

a) the text to bounce up and down when you changed the text of the button label

b) the text of two buttons side-by-side would not be aligned since one might include a capital and one might not.

 

The text box is aligned to center. This is correct behavior.

vitoi
Active Participant

It may be an optical illusion, but the R in Reset appears to be below centre. If there was a one pixel split, it would be better to have it up one pixel than down one pixel, due to the effect of lower case letters.

 

I know that things don't look right since I've repeatedly had to turn off "Lock text in center" to center my text.

 

Solution could be as simple as 1 pixel round "up" if half pixels are involved.

 

fabric
Active Participant

Question: Why do descenders not affect the centre line calculation, while capitals and ascenders do?

 

E.g. the word "EGG" would appear to be centred, while "egg" would appear to be too low. 

 

Typography makes little sense to me...