Re: NSScrollView's non-scrollbar section
Re: NSScrollView's non-scrollbar section
- Subject: Re: NSScrollView's non-scrollbar section
- From: Sam Goldman <email@hidden>
- Date: Fri, 09 Nov 2001 20:31:48 -0800
As Jay Sherman would say: "How Embarrassing"
Sorry about that. I still can't believe that missed that in the docs!
- Sam
On 11/9/01 8:25 PM, "Jim Correia" <email@hidden> wrote:
>
At 8:07 PM -0800 11/9/01, Sam Goldman wrote:
>
>
> Here's the code that I am using right now to position the views:
>
>
>
> NSScrollView *myScrollView = [[NSScrollView alloc] initWithFrame:[[[tabView
>
> tabViewItemAtIndex:0] view] bounds]];
>
> NSTextView *myTextView = [[NSTextView alloc] initWithFrame:[myScrollView
>
> bounds]];
>
>
>
> [myScrollView setHasVerticalScroller:YES];
>
> [myTextView setAutoresizingMask:18];
>
> [myScrollView setAutoresizingMask:18];
>
>
>
> [[tabView tabViewItemAtIndex:0] setView:myScrollView];
>
> [myScrollView setDocumentView:myTextView];
>
>
>
> Does this make sense to anyone. While positioning in IB would be better and
>
> easier, it is not an option.
>
>
You aren't calculating the correct view bounds.
>
>
<http://developer.apple.com/techpubs/macosx/Cocoa/Reference/ApplicationKit/Obj
>
C_classic/Classes/NSScrollView.html#//apple_ref/occ/clm/NSScrollView/contentSi
>
zeForFrameSize:hasHorizontalScroller:hasVerticalScroller:borderType:>
>
>
Jim