• 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
Table view containing cells with both an image and text
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Table view containing cells with both an image and text


  • Subject: Table view containing cells with both an image and text
  • From: Eric Gorr <email@hidden>
  • Date: Wed, 10 Dec 2008 14:54:53 -0500

I need a column in my NSTableView with cells that contain both an image and some text.

My first inclination is to subclass NSCell and have my subclass manage both a NSImageCell and a NSTextFieldCell. Basically, I would imagine would override:

- (void)drawWithFrame:(NSRect)cellFrame inView:(NSView *)controlView

and have it call drawWithFrame on the internal image cell and text cell with the appropriate frames.

Then, assuming I am on the right track, is it also then correct that what

- (id)tableView:(NSTableView *)aTableView objectValueForTableColumn: (NSTableColumn*)aTableColumn row:(NSInteger)rowIndex

would return is what NSCell's setObjectValue gets called with? Can't think of any reason why this wouldn't be the case...

Thank you.


_______________________________________________

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


  • Follow-Ups:
    • Re: Table view containing cells with both an image and text
      • From: Corbin Dunn <email@hidden>
  • Prev by Date: Re: Detecting the Enter Key
  • Next by Date: Re: Detecting the Enter Key
  • Previous by thread: Re: Distributing apps
  • Next by thread: Re: Table view containing cells with both an image and text
  • Index(es):
    • Date
    • Thread