• 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: Order of controls
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


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

  • Prev by Date: Fixing NSSegmentedControl Display Bug
  • Next by Date: NSTreeControll and different entities
  • Previous by thread: Re: Order of controls
  • Next by thread: Re: Order of controls
  • Index(es):
    • Date
    • Thread