Re: How to get a table column header with an image instead of text?
Re: How to get a table column header with an image instead of text?
- Subject: Re: How to get a table column header with an image instead of text?
- From: "Adam R. Maxwell" <email@hidden>
- Date: Sun, 20 Jul 2008 11:05:23 -0700
On Jul 20, 2008, at 10:57 AM, Jean-Daniel Dupas wrote:
Le 20 juil. 08 à 19:54, Marc Respass a écrit :
Hi again,
I hate answering my own question but I did figure it out. I sub-
classed NSTableHeaderCell then created an instance using
initImageCell. Then it occurred to me that it seemed a bit silly.
If I can init an image cell, maybe I can just set the cell. So,
create an outlet to the column (or find it somehow) and in
awakeFromNib,
NSImage *image = [NSImage imageNamed:@"CellImage"];
[[theColumn headerCell] setImage:image];
Now to figure out how to prevent the sort indicator from
displaying :).
Subclass NSTableColumneHeaderCell and override
- (void)drawSortIndicatorWithFrame:(NSRect)cellFrame inView:
(NSView*)controlView ascending:(BOOL)ascending priority:
(NSInteger)priority
I'd try -[NSTableView setIndicatorImage:inTableColumn:] passing nil
for the indicator image first.
--
Adam
Attachment:
smime.p7s
Description: S/MIME cryptographic signature
_______________________________________________
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