discuss-gnustep
[Top][All Lists]
Advanced

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

Re: Autosizing subviews


From: Andreas Höschler
Subject: Re: Autosizing subviews
Date: Fri, 2 Dec 2005 15:14:44 +0100

Hello all,

please ignore my message. The NSClipView (contentView of the NSScrollView) is correctly resized. NSClipView does not seem to automatically resize its documentView though autoresizesSubviews = YES (note sure though), but this is probably not expected anyway. So sorry for the bandwidth (there was a problem in my code that was somehow not effective on MacOSX)!

I put a ContainerView (inherits from NSView) into a NSScrollView as follows

        containerView = [[ContainerView alloc] initWithFrame:rect];
        
[scrollView setAutoresizingMask:NSViewHeightSizable | NSViewWidthSizable]; [[scrollView contentView] setAutoresizingMask:NSViewHeightSizable | NSViewWidthSizable];
        [[scrollView contentView] setAutoresizesSubviews:YES];
        [scrollView setDocumentView: containerView];

and expected the containerView to be resized automatically when I resize the window/scrollview. This works on MacOSX but not on GNUstep. Is this a GNUstep bug or am I missing anything here?

However, I noted a difference between MacOSX and GNustep. If you call setFrame: on a NSView in MacOSX this will call setFrameSize:. On GNUstep this is not the case. If sublcasses overwrite setFrameSize: with extra functionality, this won't work on GNUstep while it does on MacOSX. May be we should change the setFrame: and setFrameSize: implementations of NSView, NSScrollView,.. to behave like MacOSX does. Any thoughts?

Regards,

  Andreas





reply via email to

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