• 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: Subviews use superview's `drawRect' method?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Subviews use superview's `drawRect' method?


  • Subject: Re: Subviews use superview's `drawRect' method?
  • From: August Trometer <email@hidden>
  • Date: Tue, 16 Aug 2005 10:57:10 -0500

I'm not sure of the "why," but I have encountered this as well.

I've been able to work around it by drawing the border using [self bounds] rather than the rect variable that drawRect: gets passed.

-- August




On Aug 16, 2005, at 10:35 AM, Fritz Anderson wrote:

On 16 Aug 2005, at 9:49 AM, Damien Sorresso wrote:


I'm getting some weirdness with NSViews and subviews. Here's a screenshot of what I'm talking about.

http://www.ilstu.edu/~dsorres/nsview_weirdness.png

Check out the box around the button that says `Finish'. That border draws when I press the button, and it refuses to go away. The button's superview, is the box with the 1.5 pixel-thick border, which I draw with an `NSBezierPath' in the `drawRect' method. I've run into this type of thing before, and putting a ` [view setNeedsDisplay:YES]' in the right place does the trick. But in this case, it's not working.

Why are the subviews apparently using the superview's `drawRect' method when they're dirty?


More to the point: Does the box drawRect: stroke the framing rectangle based on the NSRect passed to it? So that when the button region is dirty it frames the button?


-- F
_______________________________________________
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: Subviews use superview's `drawRect' method?
      • From: Damien Sorresso <email@hidden>
References: 
 >Subviews use superview's `drawRect' method? (From: Damien Sorresso <email@hidden>)
 >Re: Subviews use superview's `drawRect' method? (From: Fritz Anderson <email@hidden>)

  • Prev by Date: Re: Subviews use superview's `drawRect' method?
  • Next by Date: Re: Subviews use superview's `drawRect' method?
  • Previous by thread: Re: Subviews use superview's `drawRect' method?
  • Next by thread: Re: Subviews use superview's `drawRect' method?
  • Index(es):
    • Date
    • Thread