• 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: Problem adding a background NSImageView in a Cocoa View AU?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • Follow-Ups:
    • Re: Problem adding a background NSImageView in a Cocoa View AU?
      • From: "tahome izwah" <email@hidden>
  • Prev by Date: Re: Buffer Size in Audio Units
  • Next by Date: Core Audio and Soundfonts
  • Previous by thread: Problem adding a background NSImageView in a Cocoa View AU?
  • Next by thread: Re: Problem adding a background NSImageView in a Cocoa View AU?
  • Index(es):
    • Date
    • Thread