• 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: How to center a custom NSView in a NSScrollView
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How to center a custom NSView in a NSScrollView


  • Subject: Re: How to center a custom NSView in a NSScrollView
  • From: Meik Schuetz <email@hidden>
  • Date: Tue, 24 Feb 2009 21:46:03 +0000

Hi Ben,
thanks for you answer and my apologies for answering with that delay.

I've already tried with a custom NSClipView, as explained here:

http://www.bergdesign.com/missing_cocoa_docs/nsclipview.html

This is the standard way to do this.

After working some time on other subjects, I tried the solution with the NSClipView again. The custom NSView is still drawn at the bottom left corner of the scroll view, and I've got no idea why. What I try to archive is the following:

The question is, how can I center a custom NSView in a NSScrollView, if
the visible width and/or height is greater than the fixed size of the
NSScrollView?

What does centering mean if the view’s size is larger than that of the scroll view?

If the visible area (NSScrollView) is GREATER than the fixed size of the custom NSView, the custom NSView should be positioned centered in the NSScrollView, otherwise, the default behaviour of the scroll view should apply. I just want to avoid that the custom NSView stays at the bottom left (or top left) corner of the NSScrollView, when there's enough space to center it horizontally and vertically.

Thanks for any more information about this subject.

Best regards
Meik

_______________________________________________

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: How to center a custom NSView in a NSScrollView
      • From: Andrew Farmer <email@hidden>
  • Prev by Date: Re: Drawing a badge in an OutlineView column cell: but width changes on expanding
  • Next by Date: Re: Drawing a badge in an OutlineView column cell: but width changes on expanding
  • Previous by thread: Re: Drawing a badge in an OutlineView column cell: but width changes on expanding
  • Next by thread: Re: How to center a custom NSView in a NSScrollView
  • Index(es):
    • Date
    • Thread