• 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: TableView cell with image?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: TableView cell with image?


  • Subject: Re: TableView cell with image?
  • From: Austin Sarner <email@hidden>
  • Date: Sun, 23 Jan 2005 01:00:14 -0500

Threw this in my awakeFromNib and it works:

NSTableColumn *tableColumn;
NSImageCell *imageCell;
tableColumn = [itemList tableColumnWithIdentifier:@"itemImage"];
imageCell = [[NSImageCell alloc] init];
[imageCell setEditable: YES];
[tableColumn setDataCell:imageCell];
[imageCell release];

On Jan 23, 2005, at 12:11 AM, Austin Sarner wrote:

I'm trying to set a cell in a tableview to display an image.

I start by implementing
- (void)tableView:(NSTableView *)aTableView willDisplayCell:(id)aCell forTableColumn:(NSTableColumn *)aTableColumn row:(int)rowIndex

Then I determine if it is the cell I want and do

[aCell setType:NSImageCellType];
[aCell setImage:[NSImage imageNamed:@"minitextclipping"]];

However, nothing appears. If I set it to setStringValue: then the cells correctly change caption.

Thanks for any help
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

References: 
 >TableView cell with image? (From: Austin Sarner <email@hidden>)

  • Prev by Date: How does NSArray/ObjectController add: method work?
  • Next by Date: Re: How does NSArray/ObjectController add: method work?
  • Previous by thread: TableView cell with image?
  • Next by thread: How does NSArray/ObjectController add: method work?
  • Index(es):
    • Date
    • Thread