I have an NSOutlineView, where the cells in one of the columns are NSButtonCell. In the delegate method outlineView:willDisplayCell:forTableColumn:item:, I am setting the alternate colors with

if ([te isColored]) // even row number
   [aCell setBackgroundColor:evenColor];
else
   [aCell setBackgroundColor:[NSColor whiteColor]];

This works fine for the columns which have NSTextFieldCell, and it also colors the column with the NSButtonCell, but when I select a row, the column with NSButtonCell still have the color as set above, and not the selection color.

This looks weird, as all the other columns have the selection color, and there is a gap for this column.

How do I fix this? If I set the "Alternating Rows" in IB, the selection color is fine for all the columns, but I can't use that as I have some special requirements of the coloring.

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 [EMAIL PROTECTED]

Reply via email to