• 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: NSBox Colored Background
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSBox Colored Background


  • Subject: Re: NSBox Colored Background
  • From: Michael Becker <email@hidden>
  • Date: Tue, 26 Oct 2004 19:17:04 +0200

Am 26.10.2004 um 00:22 schrieb August Trometer:
I'm trying to get an NSBox much like Apple has in iPhoto -- rounded, inset rectangle with a colored, non-metal background.

I've written a subclass which uses drawRect method to create a NSBezierPath inside the box. I can get the color just fine, and I can get the inset just fine. However, all the controls inside (such as an NSPopUpButton) still show metal as the background. Strangely, when I resize the window, the metal goes away, but as soon as the control is used, it appears again. And apparently you can't change the background of a Button. Finally, I've tried redrawing the controls in awakeFromNib with no luck.

I have done the same thing, which works just fine. Maybe you can provide the code of your drawRect: method in the NSBox subclass. Also it might be important that the controls are really subviews of your box.

Regards,
Michael

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden
  • Follow-Ups:
    • Re: NSBox Colored Background
      • From: August Trometer <email@hidden>
References: 
 >NSBox Colored Background (From: August Trometer <email@hidden>)

  • Prev by Date: Re: text color in NSTextView
  • Next by Date: Re: key codes
  • Previous by thread: NSBox Colored Background
  • Next by thread: Re: NSBox Colored Background
  • Index(es):
    • Date
    • Thread