• 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? [SOLVED]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Superimpose a NSTextField over NSImageView? [SOLVED]


  • Subject: Re: Superimpose a NSTextField over NSImageView? [SOLVED]
  • From: "M. Uli Kusterer" <email@hidden>
  • Date: Mon, 24 Apr 2006 17:15:52 +0200

On 24/04/06, desktoast music productions <email@hidden> wrote:
>
> Sorry, but this approach didn't work for me. I need to create the window
> programmatically and set its contentView to the NSView | NSImageView from
> IB
> (the window is partially transparent and has rounded edges).
> Perhaps there is a way to use the custom view from IB w|o its window (btw.
> In my "Starting Point" dialog there is "Window" only under "Carbon", not
> "Cocoa") but that would make things even more complicated.


To get a custom window under IB, you need to subclass NSWindow and override
initWithRect:backingstore:defer: or whatever the method was called. Then
drag that into your NIB file and you'll be able to choose this class as the
window's "custom class".

Nevertheless, the solution to my problem was much easier. Someone mentioned
> it on this list: all you have to do is make up your view hierarchy in the
> reverse order!


 Well, as the docs state, this is not guaranteed to work in future MacOS X
versions. If you change the text field, it may clip and invalidate
differently in the future. Since resolution-independence is on the horizon
Apple will probably make substantial changes to the drawing system soon, so
I would not rely on this approach.

Cheers,
M. Uli Kusterer
------------------------------------------------------------
       "The Witnesses of TeachText are everywhere..."
                   http://www.zathras.de
 _______________________________________________
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

References: 
 >Re: Superimpose a NSTextField over NSImageView? (From: Erik Buck <email@hidden>)
 >Re: Superimpose a NSTextField over NSImageView? [SOLVED] (From: desktoast music productions <email@hidden>)

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