Display a NSView under another NSView

  • Hi.

    I have a Cocoa application where I can switch the content of a
    NSWindow between different NSViews. Right now I can only display one
    NSView at a time. Is there any way to have two NSViews visible at
    the same time. Something like this:

    +---- Window title ----+
    |                      |
    |    First NSView    |
    |        content      |
    |----------------------|
    |    Second NSView    |
    |        content      |
    +----------------------+
  • On Tue, 31 Oct 2006 20:39:24 +0100, Marcus Karlsson <karlsson...> said:
    > Hi.
    >
    > I have a Cocoa application where I can switch the content of a
    > NSWindow between different NSViews. Right now I can only display one
    > NSView at a time. Is there any way to have two NSViews visible at
    > the same time. Something like this:
    >
    > +---- Window title ----+
    > |                      |
    > |    First NSView    |
    > |        content      |
    > |----------------------|
    > |    Second NSView    |
    > |        content      |
    > +----------------------+

    A button is an NSView. It is possible to have two buttons be visible at the
    same time, so yes, it must be possible for your two NSViews to be visible at
    the same time. And the way to do it is exactly the same: put their frames in
    different places within their superview. m.

    --
    matt neuburg, phd = <matt...>, <http://www.tidbits.com/matt/>
    A fool + a tool + an autorelease pool = cool!
    AppleScript: the Definitive Guide - Second Edition!
    <http://www.amazon.com/gp/product/0596102119>
previous month october 2006 next month
MTWTFSS
            1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28 29
30 31          
Go to today