• 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: Dumb question: How does NSScrollView know the size of the thing it's scrolling?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Dumb question: How does NSScrollView know the size of the thing it's scrolling?


  • Subject: Re: Dumb question: How does NSScrollView know the size of the thing it's scrolling?
  • From: Quincey Morris <email@hidden>
  • Date: Wed, 23 Jul 2008 11:28:26 -0700

On Jul 23, 2008, at 10:43, Rick Mann wrote:

What attribute of the contained views does NSScrollView (or the NSScroller, whatever) use to determine what the scroll bars look like? I read the doc a couple times, but I couldn't quite figure it out. Is it the bounds.size of my contained view? What if I'm setting a CoreGraphics CTM to zoom in on my drawing (my drawing code is all done using the CoreGraphics API)...I would want the extent of the scrollable area to grow accordingly...what attribute do I change?

The scroll bars depend on the ratio of the clip view bounds size (i.e. self.enclosingScrollView.contentView.bounds.size) to your view's frame (i.e. self.frame.size). So, if you zoom in to 200%, you should double your view's frame size to get the scrollbars to do the right thing. Depending on how you go about drawing the view's scaled contents, you may or may not want to change the view bounds.





_______________________________________________

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


References: 
 >Dumb question: How does NSScrollView know the size of the thing it's scrolling? (From: Rick Mann <email@hidden>)

  • Prev by Date: Re: Using NSUserDefaults with NSPreferencePane
  • Next by Date: Re: Using NSUserDefaults with NSPreferencePane
  • Previous by thread: Dumb question: How does NSScrollView know the size of the thing it's scrolling?
  • Next by thread: Re: Dumb question: How does NSScrollView know the size of the thing it's scrolling?
  • Index(es):
    • Date
    • Thread