Re: Displaying a table entry in Bold
Re: Displaying a table entry in Bold
- Subject: Re: Displaying a table entry in Bold
- From: Joe Morris <email@hidden>
- Date: Fri, 19 Apr 2002 15:46:42 -0400
On Friday, April 19, 2002, at 03:28 PM, Ondra Cada wrote:
Actually, to be really independent you would have to check whether
there is a formatter and, if so, use it to translate the "string" of
yours to real string. Even without a formatter this won't work properly
eg. if the objectValueForTableColumn:row: happens to be say an
NSNumber, which is quite possible generally.
The proper way to do that (in cases like this when you want the whole
cell'
s format to be unique) is not to play with attributed strings at all,
and just to set cell's attributes directly. Then let it to display the
data itself: why to re-write an already existing code?
True - I have the benefit of the knowledge that I don't use any
formatters and all my objects are strings. I forgot to include those
assumptions.
I agree, setting the cell's attributes would be the best way. The only
reason I did not do that was because looking around the description of
NSCell, I couldn't find any good way to do that. I saw attributes that
had to do with buttons' states, and other things like that, but nowhere
did I see something that would let me change the font type to bold or
the color to blue, for instance. If you can show me how to do that, I'd
much rather use the more generic approach. :-)
-Joe
---
Ondra Cada
OCSoftware: email@hidden http://www.ocs.cz
2K Development: email@hidden http://www.2kdevelopment.cz
private email@hidden http://www.ocs.cz/oc
_______________________________________________
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.