• 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: Problem with a tableview and image in the bg
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Problem with a tableview and image in the bg


  • Subject: Re: Problem with a tableview and image in the bg
  • From: "Louis C. Sacha" <email@hidden>
  • Date: Mon, 21 Jun 2004 13:47:40 -0700

Hello...

The problem seems to be that the NSTableview implementation of drawRect: that you invoke when you call [super drawRect:aRect] uses the NSCompositeCopy compositing operationto fill the view with the background color. NSCompositeCopy replaces anything that has been drawn with the current/provided color/image, so your previously drawn image is replaced with the transparent "clear" color.

The easiest solution might be just using your pattern as the table's background color. Unless you are doing something else that requires that you subclass NSTableview, you can change the background color/image using the provided NSTableview implementation.

Check out the documentation for NSColor, specifically the +colorWithPatternImage: method. You can create an NSColor instance which uses your image as the pattern, and then just use the NSTableview method setBackgroundColor: to change the background color of the table.


Hope that helps,

Louis



>
I'm having a problem with a tableView, it doesnt display the image
underneath it when I set the bgcolor to clearcolor look here to see:
> http://freesci.linuxgames.com/tmp/abscreenshot.png
>
...
>
When I skip [super drawRect:aRect]; I can draw the image. I have
defined a datasource for it and all.

-Fjvlnir Asgeirsson
> -Aptiva
_______________________________________________
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.


References: 
 >Problem with a tableview and image in the bg (From: Fjolnir Asgeirsson <email@hidden>)
 >Re: Problem with a tableview and image in the bg (From: Mike Ferris <email@hidden>)

  • Prev by Date: Re: Redirect stderr to NSTextView
  • Next by Date: Rép : NSArrayController
  • Previous by thread: Re: Problem with a tableview and image in the bg
  • Next by thread: Quartz and QuickTime Movies... ?
  • Index(es):
    • Date
    • Thread