• 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: NSControl objects on a custom view
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSControl objects on a custom view


  • Subject: Re: NSControl objects on a custom view
  • From: "email@hidden" <email@hidden>
  • Date: Mon, 14 Jun 2010 12:47:17 +0100

On 14 Jun 2010, at 12:28, Florian Soenens wrote:

> Then my NSTextField is a subview of my custom view but still displays with a background, that's the behavior i don't want.
> Can this be fixed somehow?
>
> On 14 Jun 2010, at 12:03, email@hidden wrote:
>
Do you want the gradient to show through the NSTextField?

I can place an NSSearchField on a gradient background and the redraw is fine.
In your gradient view make sure that you are dealing with the invalidated rect of - drawRect: correctly.
By default your receive the invalidated rect - which may be the view frame.

When you click on the NSSearchField the superview will be requested to redraw the background behind the NSSearchField.
If your gradient view simply fills the NSRect it receives in  - drawRect: this will have the effect of generating a smaller gradient behind the NSSearchField.

Regards

Jonathan Mitchell

Developer
Mugginsoft LLP
http://www.mugginsoft.com

_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: NSControl objects on a custom view
      • From: Florian Soenens <email@hidden>
References: 
 >NSControl objects on a custom view (From: Florian Soenens <email@hidden>)
 >Re: NSControl objects on a custom view (From: Jens Alfke <email@hidden>)
 >Re: NSControl objects on a custom view (From: Florian Soenens <email@hidden>)
 >Re: NSControl objects on a custom view (From: "email@hidden" <email@hidden>)
 >Re: NSControl objects on a custom view (From: Florian Soenens <email@hidden>)

  • Prev by Date: Re: NSControl objects on a custom view
  • Next by Date: "draggedImage" and "draggedImageLocation:"
  • Previous by thread: Re: NSControl objects on a custom view
  • Next by thread: Re: NSControl objects on a custom view
  • Index(es):
    • Date
    • Thread