Re: CPSplitView - fixed subview size

55 views
Skip to first unread message

Aparajita Fishman

unread,
Jun 2, 2013, 3:53:18 PM6/2/13
to objec...@googlegroups.com
Take a look at the Cocoa documentation for NSSplitViewDelegate, specifically the methods related to constraining the split position.

On Saturday, June 1, 2013 9:03:19 PM UTC-4, Konrad Madej wrote:
Hi,

I'm currently working on a simple functionality of my app that allows the user to split his view as he pleases into multiple subviews. Everything is working perfectly fine with one small exception.
The thing is I'd like to distinguish the subviews into two types: a "normal" subview that is resizing with the container, and a "toolbar" subview, that only resizes when the user drags the splitter. The "toolbar" type should automatically resize with the container only in one direction (depending on it's type: either horizontal or vertical).

No matter if I set the AutoresizingMask of the "toolbar" subview to the desired direction or don't set it at all, the subview always gets it's width/height recalculated while changing the size of the container.

I guess the method responsible for resizing the subviews is adjustSubviews? If so, then I guess what I'm trying to do is possible to accomplish (as the comment states: "What we want to do is to preserve non resizable sizes first, and then to preserve the ratio of size to available non fixed space for every other subview") but I'm probably doing something wrong.

Does anyone have any suggestions on what I might be doing wrong or how I could solve this issue any other way?

Sorry in advance if this seems trivial but I've started using Cappuccino just a few hours ago.

Konrad

Konrad Madej

unread,
Jun 3, 2013, 3:17:28 PM6/3/13
to objec...@googlegroups.com
Thanks a lot, the delegate was exactly what I've been looking for =)
Reply all
Reply to author
Forward
0 new messages