• 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
NSScrollView content origin (flipping an NSScrollView)
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

NSScrollView content origin (flipping an NSScrollView)


  • Subject: NSScrollView content origin (flipping an NSScrollView)
  • From: "Michael Watson" <email@hidden>
  • Date: Sat, 25 Nov 2006 16:40:08 -0500

This question's been answered all over the place, and for some reason,
the solution isn't working for me. I'm sure I'm missing something
really trivial. Here goes:

I've got a custom NSView subclass inside an NSScrollView. The NSView
seems to be pinned to the Cartesian 0,0 (bottom left) than the upper
left corner (which is what I need).

http://cocoadev.com/index.pl?HowDoIFlipAnNSScrollView

This is the main answer I'm seeing: return YES from -isFlipped in a
subclass of NSScrollView. Well, it makes sense to me, but it doesn't
actually seem to do anything. So I reread the various answers and the
Cocoa docs for NSScrollView, and it seems that NSScrollView actually
returns YES already. So I tried NO. No change.

Then I realized that perhaps people meant my custom view should return
YES from -isFlipped. Awesome, that works--except now all of my view's
coordinates are flipped, which is a huge headache.

So first question: What can be done about this mess? Flipping all the
coordinates of my NSView is a huge pain in the neck.

Second question: Why don't the struts work instead of -isFlipped? Why
is it that when I set the bottom margin of the view to be flexible,
with the top margin fixed, the view still doesn't get pinned to the
top of the scroll view? Why do other views (NSTextView, for example)
work as I intend when I set up the struts?


-- mikey _______________________________________________

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: Opening a specific helppage with openHelpAnchor
  • Next by Date: Re: NSTextView and Shrinking Insertion Points
  • Previous by thread: Re: Opening a specific helppage with openHelpAnchor
  • Next by thread: Re: NSScrollView content origin (flipping an NSScrollView)
  • Index(es):
    • Date
    • Thread