Text align

Hello!

I want to write a simple application using AppleScript studio but my problem in the Interface Builder.

When I put a “System Font Text” filed into a window and change it’s size to bigger then the text (horizontally & vertically), I can align the text vertically to center. Ok. But how can I align the text to center horizontally??

Maybe this is not the correct place for this question, but I didn’t find any information to solve the problem.
Any idea?

Thanks!

Operating System: Mac OS X (10.4)

Hi Bachman,

there is no built-in function to center-align a text field’s content vertically.

If you text is static and you simply want to have it displayed centered on a white rectangle background, you might simply place a text field with transparent background (uncheck ‘Draw’) over an empty text field with white Background. You can then easily align the text’s text field to the background by using ‘Size to Fit’ (text) first and then ‘Align Centers Vertically’/‘… Horizontally’ (both).

If you want to have dynamic text centered automatically then it’s much more complicated. I guess it can only be solved by using a NSTextView Subclass …

D.