• 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: Superimpose a NSTextField over NSImageView?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Superimpose a NSTextField over NSImageView?


  • Subject: Re: Superimpose a NSTextField over NSImageView?
  • From: Dave Rosborough <email@hidden>
  • Date: Sun, 23 Apr 2006 07:02:57 -0700

What about:
- (void)addSubview:(NSView *)aView positioned:(NSWindowOrderingMode) place relativeTo:(NSView *)otherView


"Inserts aView among the receiver’s subviews so it’s displayed immediately above or below otherView according to whether place is NSWindowAbove or NSWindowBelow. If otherView is nil (or isn’t a subview of the receiver), aView is added above or below all of its new siblings. Also sets the receiver as the next responder of aView."

This should do what the OP was looking for, and in fact very likely forms the basis for "Bring to Front" and "Send to Back". It doesn't seem like the drawing order of sibling NSViews is really undefined at all.

TTYL
Dave R


On 23-Apr-06, at 6:52 AM, Ondra Cada wrote:

Alan,

On 23.4.2006, at 15:34, Alan Hart wrote:

Interesting? Why are there "Bring to Front" and "Sent to Back" menu commands in IB's Layout menu?

Since you may want to have more views on the same place, *if* all of them (but one) are kept hidden (e.g., through the "hidden" binding). Though generally a tabless tabview is better for this, sometimes due to widget layout you have to do it this way.


If I overlap a NSImageView and a NSTextField in a window in IB these commands seem to do what you'd expect when you run Test Interface.

It often do. The trick is, it is not guaranteed to always. Very particularly, it may work as you presumed now, and the very opposite way in the next OS X release.
---
Ondra Čada
OCSoftware: email@hidden http://www.ocs.cz
private email@hidden http://www.ocs.cz/oc



_______________________________________________ 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

_______________________________________________ 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
  • Follow-Ups:
    • Re: Superimpose a NSTextField over NSImageView?
      • From: "Finlay Dobbie" <email@hidden>
    • Re: Superimpose a NSTextField over NSImageView?
      • From: glenn andreas <email@hidden>
References: 
 >Superimpose a NSTextField over NSImageView? (From: desktoast music productions <email@hidden>)
 >Re: Superimpose a NSTextField over NSImageView? (From: Andy Lee <email@hidden>)
 >Re: Superimpose a NSTextField over NSImageView? (From: Alan Hart <email@hidden>)
 >Re: Superimpose a NSTextField over NSImageView? (From: Ondra Cada <email@hidden>)

  • Prev by Date: Re: Superimpose a NSTextField over NSImageView?
  • Next by Date: Re: Superimpose a NSTextField over NSImageView?
  • Previous by thread: Re: Superimpose a NSTextField over NSImageView?
  • Next by thread: Re: Superimpose a NSTextField over NSImageView?
  • Index(es):
    • Date
    • Thread