NSScrollView bug : can someone confirm ?
NSScrollView bug : can someone confirm ?
- Subject: NSScrollView bug : can someone confirm ?
- From: Eric Morand <email@hidden>
- Date: Thu, 26 Oct 2006 14:23:07 +0200
Hi !
I'm facing a very strange behavior with an NSScrollView instance (not
subclassed).
I've created a scroll view programatically which contains a
NSImageView instance. Here is the code I use for this purpose :
- (void)awakeFromNib
{
NSWindow * theWindow = [self window];
NSImageView * theImageView = [[NSImageView alloc]
initWithFrame:NSMakeRect(0,0,300,300)];
[theImageView setImageFrameStyle:NSImageFrameGrayBezel];
NSScrollView * scrollView = [[NSScrollView alloc] initWithFrame:
[[theWindow contentView] frame]];
[scrollView setHasVerticalScroller:YES];
[scrollView setHasHorizontalScroller:NO];
[scrollView setAutohidesScrollers:YES];
[scrollView setBorderType:NSNoBorder];
[scrollView setAutoresizingMask:NSViewWidthSizable|
NSViewHeightSizable];
[scrollView setDocumentView:theImageView];
[theImageView release];
[theWindow setContentView:scrollView];
[scrollView release];
}
Everything seems to work perfectly...until I stretch the window
vertically to an height smaller than the height of the image view :
the vertical scroller should appear but it doesn't until the height
of the window is around 20 pixels smaller than the height of the
image view (I guess this ~20 pixels is the exact height of the
horizontal scroller that is not displayed).
I've created a test project which highlight the problem. It can be
downloaded here : http://homepage.mac.com/eric.morand/.Public/Test.zip
Just build it, run it and gently resize the window vertically until
the vertical scroller appears.
Can anyone help me on this ? Am I doing something wrong or is this a
(known) bug ?
Thanks,
Eric.
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden