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: Wolfgang Lux
Subject: Re: NSSplitView - how to programmatically resize the subviews?
Date: Tue, 31 Mar 2009 15:56:33 +0200

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.

Wolfgang






reply via email to

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