Re: Layered views and drawRect
Re: Layered views and drawRect
- Subject: Re: Layered views and drawRect
- From: Fritz Anderson <email@hidden>
- Date: Sun, 12 Dec 2004 18:50:14 -0600
On 12 Dec 2004, at 5:07 PM, Julian Pellico wrote:
In a nib I have a view hierarchy that looks like this:
NSWindow
->NSView (content view)
--->NSTextField
--->NSScrollView
----->ABView
At runtime I make sure the text field is ordered on top among its
siblings.
...
When a drag enters, I set the highlighted flag. As soon as drawRect is
run with highlighted = YES, the string in the text field is no longer
visible. My guess is it's drawn over. Why would this be the case?
ABView is not the frontmost view, and I would think that
-[NSBezierPath stroke] wouldn't paint over the whole rect anyway. Can
anyone shed some light on this?
The behavior of overlapping NSViews at the same hierarchical level is
undefined. You can't stack one view in front of another and assume
they'll consistently appear that way.
-- F
--
Fritz Anderson
Consulting Programmer Chicago, Illinois
http://resume.manoverboard.org/
_______________________________________________
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