discuss-gnustep
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSSplitView - how to programmatically resize the subviews?


From: Dr. H. Nikolaus Schaller
Subject: Re: NSSplitView - how to programmatically resize the subviews?
Date: Tue, 31 Mar 2009 16:04:42 +0200


Am 31.03.2009 um 15:56 schrieb Wolfgang Lux:

hns@computer.org wrote:

but the requirements for SWK are that only methods from older GNUstep
and Cocoa up to 10.2 are used. And it must work on GNUstep and Cocoa
(any version!).

So before implementing a special NSSplitView as part of SWK, I am
looking for the best method to achieve the same using standard
components. Any hints and/or sample code are welcome. Your benefit
will be a nice Browser and Online Help system for GNUstep...

Just resize (and reposition) the subviews involved as appropriate and
then invoke the NSSplitView's -adjustSubviews method. The latter call
apparently is necessary (at least on OS X) so that the AppKit redraws
the divider. Note that -adjustSubviews will not change the size and
positions of the subviews only if they already fill the split view's
frame with the necessary space between the subviews (as determined by
-dividerThickness). Also recall that NSSplitView uses a flipped
coordinate system, i.e., the origin is at the top left corner.

That is exactly what the current code is thought for. But at least on 10.5 it did not (yet). Subviews are evenly split (e.g. 50%, 50%). Maybe, I have
made some mistake so I will try to look again in that direction...

Nikolaus




reply via email to

[Prev in Thread] Current Thread [Next in Thread]