Re: Text with background image in table cell
Re: Text with background image in table cell
- Subject: Re: Text with background image in table cell
- From: Mike Ferris <email@hidden>
- Date: Tue, 17 Dec 2002 10:30:02 -0800
You probably need to do a custom cell for this (not a view). Text
attachments in an attributed string won't work in this case since you
want the text on top of the graphic. Attachments behave like
characters in the text (ie they are part of the character stream and
text does not overlap them or flow around them, etc...)
I would start with an NSTextFieldCell, subclass it and override the
drawing method to draw your circle before calling super. Should be
pretty simple. Then just make an instance of your subclass the
dataCell of the column(s) of the table that needs it.
Mike
Begin forwarded message:
From: Rob In der Maur <email@hidden>
Date: Tue Dec 17, 2002 9:58:34 AM US/Pacific
To: email@hidden
Subject: Text with background image in table cell
Is it possible to have text with a background image in a cell in an
NSTableView? E.g. a dynamic string on top of a coloured circle? I
guess it's possible by writing your own NSView subclass, subclass your
NSTableView and enhance your NSTableView subclass to properly display
your NSView subclass in its cells. But can it be done simplier, e.g.
by using the standard NSTableView and using NSAttributedString and the
attributedStringWithImageFromPath method? Will this still enable you
to put whatever text you want into a cell and display the image
underneath?
Any help appreciated...
cheers
o#?
Rob In der Maur
_______________________________________________
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.
_______________________________________________
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.