• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: NSTableView
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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>)

  • Prev by Date: Re: Opening an http:// URL in the user's default web browser?
  • Next by Date: Re: Opening an http:// URL in the user's default web browser?
  • Previous by thread: Re: NSTableView
  • Next by thread: Re: NSTableView
  • Index(es):
    • Date
    • Thread