• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
How to change font trait and font family for a NSBrowserCell
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

  • Prev by Date: Re: Using a Soundex category...
  • Next by Date: Re: Loading Nibs which are self-ref
  • Previous by thread: Re: Loading Nibs which are self-ref
  • Next by thread: Core Data Predicate Question
  • Index(es):
    • Date
    • Thread