Anyone know if it is possible to create custom NSScrollers for WebViews?

Discussion in 'Mac Programming' started by HungrySeacow, Jan 9, 2010.

  1. HungrySeacow macrumors regular

    Joined:
    Jan 11, 2006
    Location:
    West Palm Beach
    #1
    Just wondering if anyone knows how to do this or if they know an app that has accomplished this.

    The only idea that I have at this point is to draw the WebView in a custom NSScrollView and have the WebView grow in height to match the page contents in order to hide its scroller and use the NSScrollView to clip the WebView. This would be dirty and I would think there has to be a better approach to this.
     
  2. Sydde macrumors 68020

    Sydde

    Joined:
    Aug 17, 2009
    #2
    Not clear on what you are trying to accomplish. Web view is a subclass of NSView, so you can use notifications to discover changes in the bounds rectangle of the web view and adjust the scroll view's size as needed. You should study the structure of NSScrollView, how its subviews interact with each other, and how you can manage that interaction before going to the extreme of subclassing.
     

Share This Page