How to change font trait and font family for a NSBrowserCell
How to change font trait and font family for a NSBrowserCell
- Subject: How to change font trait and font family for a NSBrowserCell
- From: Sandeep Mohan Bhandarkar <email@hidden>
- Date: Wed, 6 Jul 2011 15:44:21 -0700
Hi All,
I am trying to set a particular font for the NSBrowserCell. Basically i want some of the cells in the Browser to Appear in bold. I tried the following in the browser willDisplayCell method but with no success. can some one please let me know what is the correct approach
- (void) browser:(NSBrowser*)theBrowser willDisplayCell:(id)cell atRow:(int)rowNumber column:(int)columnNumber
I have tried the following code so far
1) Using NSFont
[cell setFont:[NSFont fontWithName:@"Geneva-Bold"size:10]];
2) Using NSFontManager
[cell setFont:[[NSFontManager sharedFontManager] fontWithFamily:@"Geneva"
traits:NSBoldFontMask
weight:9
size:10] ];
But in either case the font does not seem to change. Is there any other way in which this can be done.
Thanks and Regards,
Sandeep.
_______________________________________________
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