FROM : Shawn Erickson
DATE : Sat Apr 09 19:12:50 2005
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.
-Shawn
DATE : Sat Apr 09 19:12:50 2005
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.
-Shawn
| Related mails | Author | Date |
|---|---|---|
| Geoff Levner | Apr 8, 17:57 | |
| Geoff Levner | Apr 9, 18:45 | |
| Shawn Erickson | Apr 9, 19:12 | |
| Geoff Levner | Apr 9, 22:01 | |
| Hamish Allan | Apr 10, 04:30 |






Cocoa mail archive

