How to center a text view with Applescript Objective C?

405 views Asked by At

I have a simple text view (which is inside a scroll view) and for the life of me I cannot make it center the text inside the text view. There is no choice in the inspector to center the text like there is when you use a normal text field. I have tried stuff like:

tell textView to setTextAlignment_(current application's setTextAlignment UITextAlignmentCenter)

But, obviously that fails. How is this done?

1

There are 1 answers

0
YeaTheMans On

Try use:

tell textView to setAlignment_(current application's NSTextAlignmentCenter)