Re: Order of controls
Re: Order of controls
- Subject: Re: Order of controls
- From: Sean Murphy <email@hidden>
- Date: Thu, 28 Dec 2006 12:51:04 -0500
On Dec 28, 2006, at 11:36 AM, Ferhat Ayaz wrote:
I want to use an image as background of my window. But there is no
way to say IB that the image should be draw first so that all
controls can be shown.
I know the menu item "send to back" in the "Layout" menu. But this
effects only the design time layout. When I do a "test run", my
controls are be drawn first so tha i can only see the image (NSImage).
To expand upon Ricky's great adviceā¦
The AppKit does not support the layering of sibling views. The only
*guaranteed* way to overlap views is to formally implement a view
hierarchy and create subviews as necessary.
Some resources on this subject:
"For performance reasons, Cocoa does not enforce clipping among
sibling views or guarantee correct invalidation and drawing behavior
when sibling views overlap. If you want a view to be drawn in front
of another view, you should make the front view a subview (or
descendant) of the rear view."
<http://developer.apple.com/documentation/Cocoa/Conceptual/
CocoaViewsGuide/WorkingWithAViewHierarchy/chapter_4_section_5.html>
"Cocoa doesn't support overlapping views. If a view belongs "on top of"
another, then it should probably be a sub-view."
<http://alastairs-place.net/cocoa/faq.txt>
Good luck,
Sean_______________________________________________
Cocoa-dev mailing list (email@hidden)
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