• 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: deactivating an NSScrollView
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: deactivating an NSScrollView


  • Subject: Re: deactivating an NSScrollView
  • From: Geoff Levner <email@hidden>
  • Date: Sat, 9 Apr 2005 22:01:10 +0200


On 9 Apr 2005, at 19:12, Shawn Erickson wrote:


On Apr 8, 2005, at 8:57 AM, Geoff Levner wrote:

Can any Cocoa gurus out there tell me if there is a simple way to "deactivate" an NSScrollView, that is, to make it behave as if the document view were attached directly to the NSScrollView's superview? Our application displays a PDF image in a scrolled view, but sometimes we would like for the image to resize itself to fill the view rather than scrolling....

NSScrollView has the ability to automatically turn the scroll controls off if they sense that the document view has a size in relation to the content view that doesn't require the scroll controls. I believe it should be as easy as resizing you document (possibly adding it again to the scroll view) and having automatic scrolling turned on (or explicitly turning them off).


Review NSScrollView's setHasHorizontalScroller:, setHasVerticalScroller:, and setAutohidesScrollers: methods.

Hiding the scrollers doesn't change the behavior of the scroll view: it just makes it impossible for the user to scroll...


And yes, I can resize the document, but in the case at hand I would like for it to be resized automatically when the window is resized.

Geoff

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


References: 
 >deactivating an NSScrollView (From: Geoff Levner <email@hidden>)
 >Re: deactivating an NSScrollView (From: Shawn Erickson <email@hidden>)

  • Prev by Date: Displaying real-time video in cocoa app
  • Next by Date: Re: Displaying real-time video in cocoa app
  • Previous by thread: Re: deactivating an NSScrollView
  • Next by thread: Re: deactivating an NSScrollView
  • Index(es):
    • Date
    • Thread