• 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: Using NSCell to bold cells in a tableview
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Using NSCell to bold cells in a tableview


  • Subject: Re: Using NSCell to bold cells in a tableview
  • From: matt neuburg <email@hidden>
  • Date: Sat, 28 Dec 2002 09:20:40 -0800

On Fri, 27 Dec 2002 11:38:13 -0800, Ben Mackin <email@hidden> said:

>
>I am trying to bold just certain rows in my NSTableView. So I have done the
>following code (tableDateTime is the NSTableColumn, browserTableView is the
>NSTableView):
>
>NSCell *myCell = [tableDateTime dataCellForRow:([browserTableView
>numberOfRows]+1)];
>[myCell setFont:[NSFont boldSystemFontOfSize:12]];
>
>However, it ends up bolding every row in my tableview

Certainly, because dataCellForRow returns the very same cell (the entire column's single dataCell), regardless of the row, and the docs are quite clear on this. Therefore, *this* (i.e. dataCellForRow) is what you need to be overriding if you want to change this behavior, and the docs are clear about this too. In short, it's just a matter of RTFM for dataCellForRow. m.

matt neuburg, phd = email@hidden, http://www.tidbits.com/matt
pantes anthropoi tou eidenai oregontai phusei
Subscribe to TidBITS! It's free and smart. http://www.tidbits.com/
_______________________________________________
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.

  • Prev by Date: Re: More Info: Help Using Malloc Debug
  • Next by Date: Dirty region avoid Screen Saver?
  • Previous by thread: Re: Using NSCell to bold cells in a tableview
  • Next by thread: Re: Using NSCell to bold cells in a tableview
  • Index(es):
    • Date
    • Thread