PDA

View Full Version : NSSplitView - moving fixed size views.




newb16
Apr 2, 2008, 03:42 AM
Hello.
I am trying to implement the following functionality of NSSplitView subclass. It contains 3 subviews,
and when the user moves the left divider to the right, central view must remain of fixed size, and the right view should shrink. I implement splitViewDidResizeSubviews and change
the size of central and right views so that central view retains its size. It seems to work - views move, and sliders are drawn correctly.
However it seems to remember the original position of the righ slider when mouse button is pressed, and does not allow the left slider to go beyond the original position
of the right slider until the mouse is released. No delegate methods are called at all if the mouse is moved somewhere on the right when the left divider reaches the original position of the right divider.
was:
[.|....|.......]
trying to move to the right:
[.....|....|...]
but not farther.

Is there any way to solve it?
Os version is 10.4

Thanks in advance.



kainjow
Apr 2, 2008, 08:10 AM
You may be interested in RBSplitView (http://www.brockerhoff.net/src/rbs.html). It's an NSSplitView replacement that has far more options and is easier to work with.

newb16
Apr 3, 2008, 09:33 AM
RBSplitView was considered, but is not an option for non-technical reasons.