Creating NSSplitView with Finder Column View Behavior

  • Is there an easy way to create an NSSplitView that behaves like the
    column view in Finder. In particular, I'd like a split view that
    moves all sibling views, maintaining the original sibling view size,
    when the slide divider is moved, rather than simply compressing/
    expanding the immediate sibling (sharing the moved divider). I know I
    can create this behavior catching 'splitView(Will|Did)ResizeSubviews'
    delegate methods and manually adjusting the view rects. But I'm
    hoping for a flag or subclass that will "magically" create this
    behavior without lots of extra code.

    Thanks in advance,
    John
  • > Is there an easy way to create an NSSplitView that behaves like the
    > column view in Finder. In particular, I'd like a split view that
    > moves all sibling views, maintaining the original sibling view
    > size,  when the slide divider is moved, rather than simply
    > compressing/expanding the immediate sibling (sharing the moved
    > divider). I know I can create this behavior catching 'splitView
    > (Will|Did)ResizeSubviews' delegate methods and manually adjusting
    > the view rects. But I'm hoping for a flag or subclass that will
    > "magically" create this behavior without lots of extra code.

    You may want to have a look at RBSPlitView. I don't remember whether
    it can do exactly what you want, but it can do a lot of fancy tricks,
    so I wouldn't be surprised.

    http://www.brockerhoff.net/src/rbs.html

    Cheers, Patrick
  • On 09 Sep 07, at 20:01, John Webb wrote:
    > Is there an easy way to create an NSSplitView that behaves like the
    > column view in Finder.

    NSBrowser, perhaps?
  • At 22:55 -0700 09/09/2007, <cocoa-dev-request...> wrote:
    > From: PGM <meirmans...>
    > References: <9BE35AE5-D57C-4E4A-9993-3357AE31FDDD...>
    > In-Reply-To: <9BE35AE5-D57C-4E4A-9993-3357AE31FDDD...>
    > Date: Mon, 10 Sep 2007 01:45:23 -0400
    > Message-ID: <1331AF41-96CE-4D22-8544-34564F15C013...>
    >
    >> Is there an easy way to create an NSSplitView that behaves like the column view in Finder. In particular, I'd like a split view that moves all sibling views, maintaining the original sibling view size,  when the slide divider is moved, rather than simply compressing/expanding the immediate sibling (sharing the moved divider). I know I can create this behavior catching 'splitView(Will|Did)ResizeSubviews' delegate methods and manually adjusting the view rects. But I'm hoping for a flag or subclass that will "magically" create this behavior without lots of extra code.
    >
    > You may want to have a look at RBSPlitView. I don't remember whether it can do exactly what you want, but it can do a lot of fancy tricks, so I wouldn't be surprised.
    >
    > http://www.brockerhoff.net/src/rbs.html

    Thanks for the referral Patrick!

    RBSplitView can indeed do that, although mimicking some of the Finder's window behaviors for column view is tricky. I've got most this working in my own code, and I'm working on the next (1.1.5) version of RBSplitView where this might be a little easier.

    Ideally 1.1.5 should have a column-view example window working in the sample app. John, if you could tell me privately about details, this would help me debug this.

    --
    Rainer Brockerhoff  <rainer...>
    Belo Horizonte, Brazil
    "In the affairs of others even fools are wise
    In their own business even sages err."
    Weblog: http://www.brockerhoff.net/bb/viewtopic.php
previous month september 2007 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
Go to today