• 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
[Q] Image background color different from NSTableView's background color
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Q] Image background color different from NSTableView's background color


  • Subject: [Q] Image background color different from NSTableView's background color
  • From: Mark de Jong <email@hidden>
  • Date: Wed, 29 May 2002 10:20:32 -0700

Hi!

I have a window with an NSTableView in it. I set the background of this view to a solid color using the setBackgroundColor: selector.

One of the columns in the NSTableView displays NSButtons whose NSCell is an NSImage.

I setup the button view with the following in the "windowDidLoad" delegate:

[myTableColumn setDataCell: [[NSButtonCell alloc] initImageCell:nil]]

where "myTableColumn" is an NSTableColumn.

Later, in the table delegate "tableView:willDisplayCell:forTableColumn:row:", I place the appropriate NSImage in the cell with:

[aCell setImage:myImage01]

The NSImages are all tiffs that have alpha channels.

The buttons and images display and are functional, with one caveat: the background color surrounding the button is the standard "horizontal striped" background rather than the solid background color set in "windowDidLoad".

How do I ensure the button's background is the same as my table's background? (Btw, I have tried this with NSOutlineView as well, with the same results).

Thanks,

-- Mark de Jong
_______________________________________________
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.

  • Follow-Ups:
    • Re: [Q] Image background color different from NSTableView's background color
      • From: Stéphane Sudre <email@hidden>
  • Prev by Date: Re: crashing in CFStringInitInlineBuffer
  • Next by Date: Re: crashing in CFStringInitInlineBuffer
  • Previous by thread: Re: crashing in CFStringInitInlineBuffer
  • Next by thread: Re: [Q] Image background color different from NSTableView's background color
  • Index(es):
    • Date
    • Thread