• 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: How to get a scroll view to recognize overflow on a custom view?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How to get a scroll view to recognize overflow on a custom view?


  • Subject: Re: How to get a scroll view to recognize overflow on a custom view?
  • From: Ron Fleckner <email@hidden>
  • Date: Mon, 23 Mar 2009 16:06:26 +1100


On 23/03/2009, at 3:12 PM, Ken Tozier wrote:

Hi

I have a custom view inside a scroll view and all works nicely except when the custom view's contents exceeds the depth of the scroll view. The scroll bars don't appear. I created the scroll view in IB from a standard widget and did nothing more than set the class of default content view to my custom class.

I read the NSScrollView docs and the companion "Scroll View Programming Guide for Cocoa" and notice that neither the contentView nor the documentView are available from inside IB. I looked at the different IB data views with scroll bars, checking what their outlets are and tried setting mine up the same, but they must be doing something behind the scenes.

What do I need to do to get the scroll view to notice when my custom view exceeds it's depth?

Hi Ken,

I may be wrong, but I came across similar scrollview behaviour in Tiger. IIRC, I asked about it here on cocoa-dev and got back that it was a known bug. As I say, not sure if this is still the case.

My workaround was to uncheck the 'has scroll bar' in IB, then, in my case:

	id scrollview = [[tableView superview] superview];
	[scrollview setHasVerticalScroller:YES];
	[scrollview display];

The behaviour I was getting in my table view was that if you/the user selected a visible row, then arrow keyed down, it would continue past the bottom of the window but no (vertical) scroll bar would show and you couldn't see what was actually selected.

HTH,

Ron


_______________________________________________

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


  • Follow-Ups:
    • Re: How to get a scroll view to recognize overflow on a custom view?
      • From: Ken Tozier <email@hidden>
References: 
 >How to get a scroll view to recognize overflow on a custom view? (From: Ken Tozier <email@hidden>)

  • Prev by Date: Re: NSAppleScript - what is going on here?
  • Next by Date: Re: How to get a scroll view to recognize overflow on a custom view?
  • Previous by thread: How to get a scroll view to recognize overflow on a custom view?
  • Next by thread: Re: How to get a scroll view to recognize overflow on a custom view?
  • Index(es):
    • Date
    • Thread