Re: Table Column Drawing Weirdness
Re: Table Column Drawing Weirdness
- Subject: Re: Table Column Drawing Weirdness
- From: "Stan Soria" <email@hidden>
- Date: Thu, 3 Mar 2005 09:24:59 -0800
- Organization: 36N 121W
Seth Willits < email@hidden >wrote on 3/3/05:
>On Mar 3, 2005, at 4:53 AM, Darkshadow wrote:
>
>>> http://www.freaksw.com/Funky.jpg
>>>
>>> Any idea what could be causing this? The only thing special about the
>>> table is that its columns were created dynamically.
>>
>> Looks like the tablecolumns' data cells are drawing their backgrounds.
>> When they do, it covers up the alternating background pattern the
>> table view uses.
>
>Well, yes of course, but why is it doing that and how can I solve it is
>the question. Questions...
>
>Seth Willits
Hi Seth,
This is what I use in the awakeFromNib Method (the original solution came
from the list archives but I don't recall the poster):
// Fixes the data cells that have "drawsBackground" set ON (Project
Builder bug)
NSArray* columns = [myTableView tableColumns];
int i;
for ( i = 0; i < [columns count]; i ++ ) {
id cell = [[columns objectAtIndex: i] dataCell];
if ( [cell respondsToSelector:@selector(setDrawsBackground:)] ) {
[cell setDrawsBackground: NO];
}
}
Stan Soria
36N 121W
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden