Re: Problem adding a background NSImageView in a Cocoa View AU?
Re: Problem adding a background NSImageView in a Cocoa View AU?
- Subject: Re: Problem adding a background NSImageView in a Cocoa View AU?
- From: Jorge Castellanos <email@hidden>
- Date: Wed, 28 Nov 2007 16:14:03 -0500
tahome,
The problem you are experiencing is because in Cocoa you can't have
overlapping views. What you can have is subviews.
Usually, a window has a "content view" which holds all its subviews,
but all of these connections are handled behind the scenes during nib
loading and initialization.
The easiest solution is to write a custom NSView that draws the image
in "drawRect: " and then just set this view as the "contentView" of
the window.
hope that helps
jorge castellanos
I'm currently trying to figure out the best way to set a background
image for the UI that I am creating using Xcode 3 in Leopard. The
background image should fill the whole view and be the backdrop image
for all the controls in that window. However, this doesn't seem to be
an easy task...
I have modified the WaveFormDemo plug NIB file to have a NSImageView
with my picture in the background and have used the "send to back"
layout option. When I run the plug in the image is displayed and all
other controls are there as well, but no matter what I do, my Image
View is alway the frontmost view hiding the controls.
I have looked everywhere and double checked that the NSImageView is
indeed in the back, but no matter what I do my image ends up on top of
everything else once I run the plug in. This is independent of the
host that I use it with, so I guess it must be a problem with the plug
in, not the host.
The funny thing is that if I create a Cocoa App and paste the very
same UI into the content view of its window everything works
beautifully. I really must be missing something here...
HELP - I am really pulling my hair out over this one!!
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Coreaudio-api mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden