• 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: How to change background color of NSDrawer?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How to change background color of NSDrawer?


  • Subject: Re: How to change background color of NSDrawer?
  • From: Fritz Anderson <email@hidden>
  • Date: Tue, 27 Jul 2004 09:44:20 -0500

If memory serves me correctly, NSDrawer is a very lightweight class. It is neither an NSWindow nor an NSView, and exposes no drawing methods of its own. From your point of view, the drawer itself has no background. It does, however, have a single content NSView, and you can substitute your own class that just fills itself with whatever color you want. I'm too lazy to make the experiment, so I can't say whether the view color extends nicely to the edges of the drawer; I fear it doesn't.

As an appalling hack, you could try [(drawerPtr->_drawerWindow) setBackgroundColor: myColor]. You'd probably need a delegate to watch the drawer and check the window color before it opens. You may not be guaranteed a valid window while it's closed, or the same window between openings.

-- F

On 26 Jul 2004, at 9:07 PM, Glenn Zelniker wrote:

I can't seem to find a way to set the color of an NSDrawer's background. It certainly doesn't seem possible to do this through IB and all of my attempts at doing it programatically are falling flat. Can anyone help?
_______________________________________________
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: 
 >How to change background color of NSDrawer? (From: Glenn Zelniker <email@hidden>)

  • Prev by Date: Re: Simplifying this code?
  • Next by Date: Re: replace authorization window
  • Previous by thread: How to change background color of NSDrawer?
  • Next by thread: Re: How to change background color of NSDrawer?
  • Index(es):
    • Date
    • Thread