Re: Subview drawing order ?
Re: Subview drawing order ?
- Subject: Re: Subview drawing order ?
- From: Rainer Brockerhoff <email@hidden>
- Date: Tue, 23 Oct 2001 14:23:02 -0200
Date: Tue, 23 Oct 2001 09:09:08 -0400
From: Robert Miller <email@hidden>
This is probably a basic question but I haven't found an answer yet.
Can someone tell me if there is a way to control the order in which
NSView draws its subviews ? I have a custom view that contains various
other custom subviews. I want outermost superview to draw last so that
whatever is drawn in it overlays the subviews that are drawn. Is there
a way to do this ?
If a view contains subviews they get drawn on top of it, by definition.
AFAIK overlapping views (to draw on top of other views) aren't
supported - currently they get drawn in _reverse_ order from the
layering you do in Interface Builder, but this may change in the
future. If you want to draw annotations or whatever on top of your
views it would probably be doable by overlaying a partially
transparent window and drawing into that.
--
Rainer Brockerhoff <email@hidden>
Belo Horizonte, Brazil
"Originality is the art of concealing your sources."
http://www.brockerhoff.net/ (updated Oct. 2001)