Re: Restricting an NSSplitView when Resizing a Window
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.