Re: Order of controls
Re: Order of controls
- Subject: Re: Order of controls
- From: Ricky Sharp <email@hidden>
- Date: Thu, 28 Dec 2006 11:01:28 -0600
On Dec 28, 2006, at 10: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).
You have to make sure that all your controls are subviews of the
image view. One annoying thing about IB is that although NSImageView
is included in the "container" section of the palette, it doesn't act
like a container (i.e. you cannot directly put controls inside of it
in IB).
Workaround:
(1) Create a custom view and make all your controls subviews of it.
(2) Either set the class of the custom view to NSImageView, or create
your own simple view class that can draw an image.
(3) Make sure to create an outlet to the custom view so that your
controller can set its image at runtime.
You may want to file a bug against IB to allow NSImageView to act
like a container for editing. Or, if NSImageView was never intended
to be a container, it should not be listed under the Container
section in IB's palette window.
Finally, if this "image container" is something you'll really be
using often and would like to see the image display in IB, consider
creating a simple IB palette.
___________________________________________________________
Ricky A. Sharp mailto:email@hidden
Instant Interactive(tm) http://www.instantinteractive.com
_______________________________________________
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