Re: SOLVED Unable to centre align NSCell attributed title and alternate attributed title
Re: SOLVED Unable to centre align NSCell attributed title and alternate attributed title
- Subject: Re: SOLVED Unable to centre align NSCell attributed title and alternate attributed title
- From: Peter Teeson <email@hidden>
- Date: Sun, 03 Nov 2013 10:54:03 -0500
Solved. I added this attribute to the dictionary and string
NSMutableParagraphStyle *centredStyle = [[NSParagraphStyle defaultParagraphStyle] mutableCopy];
[centredStyle setAlignment:NSCenterTextAlignment];
(and changed the string to Mutable as well)
On 2013-11-01, at 5:12 PM, Peter Teeson wrote:
> OS X Lion 10.7.5, Xcode 4.6.3, Document based app for OS X. The title states my problem.
> NOTE: IB is not used for anything other than a default empty nib. Views etc are all done programmatically.
> The 3 x 3 matrix is displayed with the attributed titles and alternates but left aligned.
> I am unable to change this behaviour
>
> However if I use the setTitle and setAlternateTitle methods (using strings instead of attributed strings) everything works.
> I had hoped to use italic AlternateTitles hence the code below but which does not centre align the title in the Cell.
>
> I'd appreciate any help in telling me where I've misunderstood or coded badly. Thanks. Peter
_______________________________________________
Cocoa-dev mailing list (email@hidden)
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:
This email sent to email@hidden