• 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: Restricting an NSSplitView when Resizing a Window
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Restricting an NSSplitView when Resizing a Window


  • Subject: Re: Restricting an NSSplitView when Resizing a Window
  • From: Brock Brandenberg <email@hidden>
  • Date: Mon, 17 Feb 2003 17:24:24 -0600

> Let's assume I have two NSTableViews grouped by an NSSplitView, with
> the springs set accordingly so that they grow when the window resizes.
>
> When I grow the window, the splitview/tableviews grow correctly, but
> the splitview grows (that is, it moves) proportionally. I'd like to
> restrict the size of the above table view (lock the splitview in place)
> while the bottom one grows appropriately.
>
> How can I do that?

Use the delegate methods for the NSSplitView:

- splitView:constrainMaxCoordinate:ofSubviewAt:
- splitView:constrainMinCoordinate:ofSubviewAt:
- splitView:constrainSplitPosition:ofSubviewAt:

You can limit the lower bounds, upper bounds or restrict it to specific
positions. Just wire your split view delegate connection to a delegate
object in IB, then implement the methods in the delegate object with your
desired behavior.

Brock Brandenberg

----- industrial design @ www.bergdesign.com ------
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.

  • Follow-Ups:
    • Re: Restricting an NSSplitView when Resizing a Window
      • From: Tito Ciuro <email@hidden>
  • Prev by Date: formatting NSDate
  • Next by Date: Some Questions
  • Previous by thread: Restricting an NSSplitView when Resizing a Window
  • Next by thread: Re: Restricting an NSSplitView when Resizing a Window
  • Index(es):
    • Date
    • Thread