Re: Gradient NSOutlineView row - Text color of it's NSTextFieldCell
Re: Gradient NSOutlineView row - Text color of it's NSTextFieldCell
- Subject: Re: Gradient NSOutlineView row - Text color of it's NSTextFieldCell
- From: "Alan Smith" <email@hidden>
- Date: Sat, 28 Jul 2007 19:56:32 -0400
Florian,
- [NSCell isHighlighted] is not quite the method you want. It would
make sense if it did what you want but it doesn't, it's not your
fault, it's the fault of NSTableView/NSOutlineView. When a row is
selected NSTableView handles the duty of drawing it as highlighted, it
doesn't tell the cells in the row that they are highlighted because
they may get in the way.
To remedy this override selectRowIndexes:: in your NSOutlineView. With
each row get the dataCell from the appropriate table column and
setHighlighted: YES. You will probably have to set all previously
selected cells to not highlighted. It might be slow but there should
be ways to improve it.
Good luck!
Cheers, Alan
--
My blog: cocoalate.info
// Things I've said -------------------------
"Maturity resides in the mind."
"Silence is the Universe's greatest gift."
"When the World realizes that personal beliefs are not something to
argue or fight over, it shall evolve."
_______________________________________________
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