[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: GSVBox or maybe NSSplitView - Resizing Problem
From: |
Nicola Pero |
Subject: |
Re: GSVBox or maybe NSSplitView - Resizing Problem |
Date: |
Tue, 1 Jan 2002 14:11:06 +0000 (GMT) |
> Greetings!
>
> I have a very simple window:
>
> [=============+==============]
> [ TABLEVIEW | FORM ]
> [ +--------------------]
> [ | TEXTVIEW ]
> [=============+===============]
>
> My main window content view is the NSSplitView, which has two views, my
> NSScrollView containing a NSTableView and then a GSVBox containing a
> NSForm and another NSScrollView which contains a NSTextView.
>
> My problem is that the right pane (Form/TextView) does not resize.
The problem is with using the NSSplitView.
The NSSplitView is setting the subviews' frames using setFrame: directly
rather than resizeSubviewsWithOldSuperviewFrame: as normally done in
response to resizing by the user ... it's using `hard ways' rather than
the more polite ones ... I'm thinking we might make the GSVBox code
smarter so that it can manage that ... anyway I'll think about that - in
the meanwhile here is a recipe to fix your resizing problem whatever will
be done to NSSplitView and GSVbox ... Just create an intermediate NSView
and put the GSVbox inside it - that NSView will convert the hard resize
into a mild one and it should work -
NSView *viewA = AUTORELEASE ([NSView new]);
[viewA setAutoresizesSubviews: YES];
[viewA setFrameSize: [formVBox frame].size];
[viewA addSubview: formVBox];
And then add the view instead of the vbox to the splitview -
[splitView addSubview: viewA];
hope that helps
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- Re: GSVBox or maybe NSSplitView - Resizing Problem,
Nicola Pero <=