Scroller show/hide not triggered on doc resize

  • Hi

    I have an NSScrollView containing a programatically sized custom
    NSView as its document view and can't get the scrollbars to show when
    the doc view becomes deeper than the NSScrollView's frame.

    I'm resizing the doc view by manipulating it's frame rectangle with
    [obj setFrame: newFrame]. Is that the correct property to get the
    scroller to trigger? Do I need to set something else? Perhaps in the
    scroll view or clip view?

    Thanks for any help

    Ken
  • On 2007 Oct, 21, at 12:24, Ken Tozier wrote:

    > I have an NSScrollView containing a programatically sized custom
    > NSView as its document view and can't get the scrollbars to show
    > when the doc view becomes deeper than the NSScrollView's frame.

    Ken, there are two ways to do this.  Which are you having trouble with?

        (a) relying on -setAutohidesScrollers:YES
        (b) using -setHasVerticalScroller:YES/NO "manually" based on your
    document view size?

    I've often had trouble with (a), and my solution is to use (b).  I
    think it looks better when the scroller is gone too, since the
    scroller completely disappears instead of leaving the dirty gray
    ghost as in (a).
previous month october 2007 next month
MTWTFSS
1 2 3 4 5 6 7
8 9 10 11 12 13 14
15 16 17 18 19 20 21
22 23 24 25 26 27 28
29 30 31        
Go to today