• 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: changing colors in NSTableView
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: changing colors in NSTableView


  • Subject: Re: changing colors in NSTableView
  • From: Andreas Mayer <email@hidden>
  • Date: Fri, 1 Nov 2002 15:23:09 +0100

Am Donnerstag, 31.10.02 um 21:23 Uhr schrieb Dave Sopchak:

Does anyone know a way of changing the text color in an NSTableView? As it is, setting the background color in IB does weird things anyway.

Setting the background color works fine for me.

You will want to make sure that the background color of your cells is transparent.
In my case I figured out that IB used an opaque background for the cell(s) of the first column but made it transparent for any subsequent columns; so I just used the cell of the second column for the first too. Here's some code:

// use striped window background
[shortcutTableView setBackgroundColor:[NSColor windowBackgroundColor]];
// use transprent background for cells
[[shortcutTableView tableColumnWithIdentifier:@"Title"] setDataCell:[[shortcutTableView tableColumnWithIdentifier:@"Key"] dataCell]];


bye. Andreas.
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.

  • Prev by Date: Re: metallized interface
  • Next by Date: RE: Coding style question from ObjC newbie
  • Previous by thread: Re: metallized interface
  • Next by thread: RE: Coding style question from ObjC newbie
  • Index(es):
    • Date
    • Thread