Re: Rotating NSTextField 90 degrees

2020-09-24 Thread Carl Hoefs via Cocoa-dev
Both work perfectly:

   m4TField.layer.transform = CATransform3DMakeRotation(3.14159/2.0,0,0,1);

- or -

   [m4TField setFrameRotation:90.0];

Thanks!
-Carl


> On Sep 24, 2020, at 9:19 PM, Alex Zavatone  wrote:
> 
> http://digerati-illuminatus.blogspot.com/2009/09/how-do-you-rotate-nsbutton-nstextfield.html
> 
> 
> 
>> On Sep 24, 2020, at 11:09 PM, Carl Hoefs via Cocoa-dev 
>>  wrote:
>> 
>> In my MacOS app I need to display some vertical text (normal text rotated 90 
>> degrees counterclockwise).
>> 
>> I don't see anything in NSTextField or Xcode IB that allows a change of 
>> orientation. Could NSAttributedString be used to do this, or is there some 
>> CoreGraphics way?
>> 
>> -Carl
>> 
>> ___
>> 
>> Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)
>> 
>> Please do not post admin requests or moderator comments to the list.
>> Contact the moderators at cocoa-dev-admins(at)lists.apple.com
>> 
>> Help/Unsubscribe/Update your Subscription:
>> https://lists.apple.com/mailman/options/cocoa-dev/zav%40mac.com
>> 
>> This email sent to z...@mac.com
> 

___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


Re: Rotating NSTextField 90 degrees

2020-09-24 Thread Alex Zavatone via Cocoa-dev
http://digerati-illuminatus.blogspot.com/2009/09/how-do-you-rotate-nsbutton-nstextfield.html



> On Sep 24, 2020, at 11:09 PM, Carl Hoefs via Cocoa-dev 
>  wrote:
> 
> In my MacOS app I need to display some vertical text (normal text rotated 90 
> degrees counterclockwise).
> 
> I don't see anything in NSTextField or Xcode IB that allows a change of 
> orientation. Could NSAttributedString be used to do this, or is there some 
> CoreGraphics way?
> 
> -Carl
> 
> ___
> 
> Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)
> 
> Please do not post admin requests or moderator comments to the list.
> Contact the moderators at cocoa-dev-admins(at)lists.apple.com
> 
> Help/Unsubscribe/Update your Subscription:
> https://lists.apple.com/mailman/options/cocoa-dev/zav%40mac.com
> 
> This email sent to z...@mac.com

___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


Re: Rotating NSTextField 90 degrees

2020-09-24 Thread Alex Zavatone via Cocoa-dev
Check out 

frameRotation or 

myView.wantsLayer = YES;
myView.layer.transform = CATransform3DMakeRotation(angle, 
0, 0, 1);

There is this too.

https://developer.apple.com/documentation/appkit/nsview/1483444-rotate 


https://developer.apple.com/documentation/appkit/nsview/1483444-rotatebyangle?language=objc


> On Sep 24, 2020, at 11:09 PM, Carl Hoefs via Cocoa-dev 
>  wrote:
> 
> In my MacOS app I need to display some vertical text (normal text rotated 90 
> degrees counterclockwise).
> 
> I don't see anything in NSTextField or Xcode IB that allows a change of 
> orientation. Could NSAttributedString be used to do this, or is there some 
> CoreGraphics way?
> 
> -Carl
> 
> ___
> 
> Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)
> 
> Please do not post admin requests or moderator comments to the list.
> Contact the moderators at cocoa-dev-admins(at)lists.apple.com
> 
> Help/Unsubscribe/Update your Subscription:
> https://lists.apple.com/mailman/options/cocoa-dev/zav%40mac.com
> 
> This email sent to z...@mac.com

___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


Rotating NSTextField 90 degrees

2020-09-24 Thread Carl Hoefs via Cocoa-dev
In my MacOS app I need to display some vertical text (normal text rotated 90 
degrees counterclockwise).

I don't see anything in NSTextField or Xcode IB that allows a change of 
orientation. Could NSAttributedString be used to do this, or is there some 
CoreGraphics way?

-Carl

___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com