• 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: NSScrollView : documentView stuck in the bottom-left corner !
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSScrollView : documentView stuck in the bottom-left corner !


  • Subject: Re: NSScrollView : documentView stuck in the bottom-left corner !
  • From: Erik Buck <email@hidden>
  • Date: Fri, 12 Aug 2005 21:27:29 -0400

This subject is really a FAQ.

The Quartz coordinate system used in Mac OS X has the origin in the lower left corner just like Postscript, PDF, and every math textbook that contains a graph.

Western languages and historical CRT electron beams start in the upper left corner of the display and scan left to right down the display.

I regret that "Cocoa Programming" does not contain more information on this particular subject.

Placing an arbitrary view so that its top left corner corresponds to the top left cornet of a clip view [content view of a scroll view] that contains it is similar to the problem of centering an arbitrary view in a clip view.

I usually set the document view to be a flipped NSView instance and then add my custom (not flipped) view as a sub-view of the document view. The document view can also be used to center the custom view, provide margins, etc.

Here is another solution that actually replaces the clip view:
http://www.bergdesign.com/missing_cocoa_docs/nsclipview.html

Here is a random sampling of the previous times this question was asked:
http://www.cocoabuilder.com/archive/message/2003/8/1/92472
http://www.cocoabuilder.com/archive/message/2003/10/30/1527
http://www.cocoabuilder.com/archive/message/2005/6/27/140185


_______________________________________________ Do not post admin requests to the list. They will be ignored. Cocoa-dev mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: This email sent to email@hidden
  • Prev by Date: Bindings: Accessing Data in an NSArrayController
  • Next by Date: Re: NSScrollView : documentView stuck in the bottom-left corner !
  • Previous by thread: Re: NSScrollView : documentView stuck in the bottom-left corner !
  • Next by thread: Re: NSScrollView : documentView stuck in the bottom-left corner !
  • Index(es):
    • Date
    • Thread