missing vertical scroll bar
missing vertical scroll bar
- Subject: missing vertical scroll bar
- From: Dale Miller <email@hidden>
- Date: Fri, 17 Jul 2009 08:08:48 -0700
When I execute the application using the code excerpts shown below,
the vertical scroll bar never appears, whether I add enough text to
overflow the clip view, or resize the scroll view by resizing the
window so that the existing text no longer fits within the clip view.
All of the scroll view mechanism except for the display of the
vertical scroll bar works as expected, since I can scroll vertically
with the mouse scroll wheel.The horizontal scroll bar appears and
disappears when I resize the scroll view horizontally.
Changing the sequence of the "set..." messages, or issuing: [scview
setAutohidesScrollers:NO] has no effect.
scrollSize = [NSScrollView frameSizeForContentSize:NSMakeSize(tvw,tvh)
hasHorizontalScroller:YES
hasVerticalScroller:YES
borderType:NSLineBorder];
...
scview = [[[NSScrollView alloc] initWithFrame:
NSMakeRect(15.,15.,scrollSize.width,scrollSize.height)]
retain];
[scview setBorderType:NSLineBorder];
[scview setAutoresizingMask:NSViewWidthSizable+NSViewHeightSizable];
[scview setHasHorizontalScroller:YES];
[scview setHasVerticalScroller:YES];
[scview setAutohidesScrollers:YES];
[[window contentView] addSubview:scview];
...
textView = [[NSTextView alloc]
initWithFrame:NSMakeRect(0.,0.,tvw,tvh)];
textc = [textView textContainer];
[textc setWidthTracksTextView:NO];
[textc setHeightTracksTextView:NO];
[textView setHorizontallyResizable:YES];
[textView setVerticallyResizable:YES];
[textc setContainerSize:NSMakeSize(FLT_MAX,FLT_MAX)];
[textView setTextContainerInset:NSMakeSize(0.,0.)];
[textc setLineFragmentPadding:0.];
[textView setFont:fixed];
[scview setDocumentView:textView];
Does anyone see what I'm missing?
Dale Miller
email@hidden
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden