I am creating an NSAttributedString containing an image in an
NSTextAttachment, setting an NSTableView headerCell to the
attachmentCell.
This works great, the image is shown nicely on the table view column
header.
But I am unable to get the image centered in the column header. Anyone
have a hint to how I can do that?
Here is my code:
NSImage *warningImage = [NSImage imageNamed:@"danger"];
NSTextAttachment *ta = [[[NSTextAttachment alloc] init]
autorelease];
[(NSCell *)[ta attachmentCell] setImage:warningImage];
NSAttributedString *headerAS = [NSAttributedString
attributedStringWithAttachment:ta];
[[[oactiveElementsTable tableColumnWithIdentifier:@"warningword"]
headerCell] setAttributedStringValue:headerAS];
Ivan
_______________________________________________
Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)
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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com
This email sent to arch...@mail-archive.com