Re: NSTableView
Re: NSTableView
- Subject: Re: NSTableView
- From: Mark T <email@hidden>
- Date: Mon, 27 Aug 2001 15:09:03 -0400
I am having no luck setting the grid color of my table view. From
what I can tell, setGridColor: does nothing while
setBackgroundColor: sets both the grid and background colors for
some cells/columns and the grid color alone for the remaining cells.
I am putting the following in my awakeFromNib: Any ideas?
[tableView setDrawsGrid:YES];//should be un-necessary
[tableView setGridColor:[NSColor whiteColor]]; //doesn't do anything
[tableView setBackgroundColor:[NSColor grayColor]]; //sets
background and grid for some reason
This is an Interface Builder bug. If you check IB's draw grid button,
it makes it so that the table thinks the grid is on, even though it
isn't. So you're choices, if you want the grid to draw, are the
following:
don't check the box in IB and instead *just* call
[tableView setDrawsGrid:YES];
in your code.
OR
check the box in IB, and call
[tableView setDrawsGrid:NO];
[tableView setDrawsGrid:YES];
in your code.
Either way should cause the gridlines to draw properly and I'm sure
you can see which is easier (until Apple fixes the IB bug).
Mark T.
References: | |
| >NSTableView (From: Darin Duphorne <email@hidden>) |