• 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
Re: Displaying a table entry in Bold
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Displaying a table entry in Bold


  • Subject: Re: Displaying a table entry in Bold
  • From: Ondra Cada <email@hidden>
  • Date: Fri, 19 Apr 2002 21:22:29 +0200

On Friday, April 19, 2002, at 08:41 , Brian Webster wrote:

-(id)tableView:(NSTableView *)tableView objectValueForTableColumn:(NSTableColumn *)tableColumn row:(int)row
{
id objectValue = nil;
NSString *string = [self getTheStringToDisplayInThisCell];

if(iWantToDisplayThisStringAsBold)
{
objectValue = [[NSMutableAttributedString alloc] initWithString:string];
[objectValue applyFontTraits:NSBoldFontMask range:NSMakeRange(0, [string length])];
[objectValue autorelease];
}
else
objectValue = string;
return objectValue;
}

This would work all right, but in case your datasource stores plain strings I am afraid the delegate-based solution would be *considerably* more effective.
---
Ondra Cada
OCSoftware: email@hidden http://www.ocs.cz
2K Development: email@hidden http://www.2kdevelopment.cz
private email@hidden http://www.ocs.cz/oc
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.
  • Follow-Ups:
    • Re: Displaying a table entry in Bold
      • From: Joe Morris <email@hidden>
References: 
 >Re: Displaying a table entry in Bold (From: Brian Webster <email@hidden>)

  • Prev by Date: Re: Time & Date Control?
  • Next by Date: Re: Displaying a table entry in Bold
  • Previous by thread: Re: Displaying a table entry in Bold
  • Next by thread: Re: Displaying a table entry in Bold
  • Index(es):
    • Date
    • Thread