Re: Superimpose a NSTextField over NSImageView? [SOLVED]
Re: Superimpose a NSTextField over NSImageView? [SOLVED]
- Subject: Re: Superimpose a NSTextField over NSImageView? [SOLVED]
- From: desktoast music productions <email@hidden>
- Date: Mon, 24 Apr 2006 10:42:02 +0200
> I just did this in Interface Builder:
>
> 1) Start Interface Builder
> 2) Select File->New... menu item
> 3) In "Starting Point" dialog that appears, Select "Window" and press
> the button labeled "New".
> 4) Drag text fields, progress bars, and any other controls of
> interest from Interface Builder's palette to the editable window that
> IB provides.
> 5) Arrange the configure controls as desired.
> 6) Select all of the controls.
> 7) Use Layout->Make subviews of->Custom View
> 8) Select the custom view.
> 9) Use IB's custom calls inspector (Cmd-5) to set the class of the
> custom view to NSImageView or any other kind of view you like.
> 10) Use the outline mode of IB's inspector's Instances tab to verify
> that the view hierarchy was created as desired.
>
> Use this technique to create whatever view hierarchy you want from
> now on and always remember that sibling views should not overlap.
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.
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!
If I put the text field on the custom view, then drag the big image view
OVER it, so that I can't see the text - all I have to do is press Command-R
and ta-daah, the text field is displayed ABOVE the image just like I want it
to. Funny, isn't it?
Thank you everyone,
Peter
--
peter schwaiger
desktoast music productions
http://www.autlawmusic.com
_______________________________________________
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