• 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: Jim Correia <email@hidden>
  • Date: Fri, 9 Nov 2001 23:25:19 -0500

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/ObjC_classic/Classes/NSScrollView.html#//apple_ref/occ/clm/NSScrollView/contentSizeForFrameSize:hasHorizontalScroller:hasVerticalScroller:borderType:>

Jim


  • Follow-Ups:
    • Re: NSScrollView's non-scrollbar section
      • From: Sam Goldman <email@hidden>
References: 
 >NSScrollView's non-scrollbar section (From: Sam Goldman <email@hidden>)

  • Prev by Date: NSScrollView's non-scrollbar section
  • Next by Date: Re: NSScrollView's non-scrollbar section
  • Previous by thread: NSScrollView's non-scrollbar section
  • Next by thread: Re: NSScrollView's non-scrollbar section
  • Index(es):
    • Date
    • Thread