• 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
Centering a view in an NSScrollView
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Centering a view in an NSScrollView


  • Subject: Centering a view in an NSScrollView
  • From: Dustin Mierau <email@hidden>
  • Date: Sat, 19 Jan 2002 19:32:03 -0800

I have a view in an NSScrollView, when the contentSize of the scrollview is larger than my view I want my view to appear centered within the scrollview, even as the scrollview is being resized. Right now it is tagged to the bottom left. I know I can return YES from the isFlipped method to tag it to the top left, but like I said, I want it centered. There does not seem to be a good way to do this, any ideas?

Thanks,
-dustin


  • Follow-Ups:
    • Re: Centering a view in an NSScrollView
      • From: Christopher B Hamlin <email@hidden>
    • Re: Centering a view in an NSScrollView
      • From: Christopher B Hamlin <email@hidden>
  • Prev by Date: Re: How to choose file without extension in NSOpenPanel
  • Next by Date: NewbieQ: Why can't I have a customview as an initalResponder??
  • Previous by thread: Re: SEL and NSSelectorFromString
  • Next by thread: Re: Centering a view in an NSScrollView
  • Index(es):
    • Date
    • Thread