Re: NSSplitView size, how to change ?!
Re: NSSplitView size, how to change ?!
- Subject: Re: NSSplitView size, how to change ?!
- From: Greg Titus <email@hidden>
- Date: Mon, 21 Jan 2002 16:24:01 -0800
On Monday, January 21, 2002, at 03:58 PM, Vince DeMarco wrote:
On Monday, January 21, 2002, at 01:40 PM, Gore wrote:
hmmm, I tryed that with one view in the splitview, and it didn't work,
I tryed to call setFrame: to one of the splitview views (2 views) but
nothing happend, did I do something wrong ?!
I just check out some internal code (which i can't send to you sorry)
that figures out the percentage that each view occupies (stores this in
the defaults) then on app startup, uses this value to reset the frame
of each of the views in the splitview and then tells the splitview to
redraw itself. ([splitview setNeedsDisplay:])
mail does this and it works find.
Try doing both views.
Yep. Both views need changing to get it to work. If you want code, you
can look at NSSplitView-OAExtensions in OmniAppKit, which adds:
@interface NSSplitView (OAExtensions)
- (float)fraction;
- (void)setFraction:(float)newFract;
- (int)topPixels;
- (void)setTopPixels:(int)newTop;
- (int)bottomPixels;
- (void)setBottomPixels:(int)newBottom;
@end
--Greg