• 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: Getting NSScrollView to ignore scrolling
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Getting NSScrollView to ignore scrolling


  • Subject: Re: Getting NSScrollView to ignore scrolling
  • From: Peter Lübke <email@hidden>
  • Date: Sun, 20 Feb 2011 01:25:14 +0100

HI All,

I have a NSTableView/NSScrollView setup that I've configured automatically to resize to contain the content of the table. This may sound silly, but I don't want scrolling behavior, but NSTableView seems to be designed to be inside a NSScrollView.

My question is this: how do I get the scroll view to ignore scrolling messages? The tables/scrollviews are sitting on views that are part of a homebrew collection view, and the scrolling "catches" on them, even though there's no scrolling to be done. The scroll view is taking the events, but there is nothing for them to do. I want to be able to scroll past the table using a scrollwheel or the trackpad without the scrolling action "catching."


What do you mean with "scroll past the table"?

Did you try to call setHasHorizontalScroller:NO, setHasVerticalScroller: NO, setHasHorizontalRuler:NO, setHasVerticalRuler:NO and setLineScroll:0.0 on the enclosing scroll view?

You can create your own table view without an enclosing scroll view; there's some more work to do than simply dragging an NSTableView into a window in IB. Create an NSTableView subclass, add your table columns, override -calcSize and -sizeToFit to fit your resizing behaviour, and add it wherever it is supposed to be in your view hierarchy. Start creating instances with [[myTableView alloc] - initWithFrame:...].

Cheers,
Peter
_______________________________________________

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: Getting NSScrollView to ignore scrolling
      • From: Quincey Morris <email@hidden>
References: 
 >Getting NSScrollView to ignore scrolling (From: Andrew Shamel <email@hidden>)

  • Prev by Date: Re: -[NSSet containsObject:] returns NO when it should return YES
  • Next by Date: Re: Getting NSScrollView to ignore scrolling
  • Previous by thread: Getting NSScrollView to ignore scrolling
  • Next by thread: Re: Getting NSScrollView to ignore scrolling
  • Index(es):
    • Date
    • Thread