• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: NSScrollView's non-scrollbar section
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


References: 
 >Re: NSScrollView's non-scrollbar section (From: Jim Correia <email@hidden>)

  • Prev by Date: Re: NSScrollView's non-scrollbar section
  • Next by Date: Re: workspaces and capturing keystrokes
  • Previous by thread: Re: NSScrollView's non-scrollbar section
  • Next by thread: Threading, save panels, and segfaults
  • Index(es):
    • Date
    • Thread