• 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: Adding scroll bars to a custom NSView
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Adding scroll bars to a custom NSView


  • Subject: Re: Adding scroll bars to a custom NSView
  • From: Murat Konar <email@hidden>
  • Date: Mon, 09 Apr 2007 19:06:41 -0700
  • Resent-date: Mon, 09 Apr 2007 19:06:59 -0700
  • Resent-from: Murat Konar <email@hidden>
  • Resent-message-id: <email@hidden>
  • Resent-to: Dev Cocoa <email@hidden>

You can enclose any view in an NSScrollView in Interface Builder by selecting the view, then choosing the "Layout > Make subviews of > Scroll View" command.

_murat

On Apr 9, 2007, at 6:41 PM, Matt Ball wrote:

Enclose it in an NSScrollView. In OS X, scrollbars are provided by a
scrollView, not by the main view itself.

See
http://developer.apple.com/documentation/Cocoa/Reference/ ApplicationKit/Classes/NSScrollView_Class/Reference/Reference.html


Specifically, NSScrollView's setDocumentView: method.

Hope that helps.

- Matt Ball


On 4/9/07, Mohannad Hashem <email@hidden> wrote:

So this might be obvious to a lot of people, but I just can't seem to figure it out. How can you add the standards OS X scrollers (with all their regular auto-hide functionality) to a view that you have created yourself?
_______________________________________________

Cocoa-dev mailing list (email@hidden)

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


  • Prev by Date: Arrow support for NSBezierPath
  • Next by Date: Re: compiletime errors in Release but not Debug for Foundation Tool
  • Previous by thread: Re: Adding scroll bars to a custom NSView
  • Next by thread: compiletime errors in Release but not Debug for Foundation Tool
  • Index(es):
    • Date
    • Thread