Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Order of controls




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:
http://lists.apple.com/mailman/options/cocoa-dev/email@hidden

This email sent to email@hidden
References: 
 >Order of controls (From: Ferhat Ayaz <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.