views:

11

answers:

1

I have a window with a source list sidebar at the right side and a content view on the left both inside an NSSplitView.

When i resize the window, the additional space is distributed to the source list and the content view. How can i make the source list to maintain its fixed width. All Apple applications are doing this so i hope i just missed a method.

A: 

On SnowLeopard, there is a delegate method called splitView:shouldAdjustSizeOfSubview:. All you have to do is return NO for your source list view, and you should be good. If you need to support Leopard or earlier, you have to implement splitView:resizeSubviewsWithOldSize: and manually resize the subviews, keeping your source list view a fixed width, and resizing your other view to fill the split view's bounds (taking into account the divider's width).

Both methods are documented here

kperryua