• 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: Interacting Sizes of NSScrollView and its NSClipView and a Custom NSView
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Interacting Sizes of NSScrollView and its NSClipView and a Custom NSView


  • Subject: Re: Interacting Sizes of NSScrollView and its NSClipView and a Custom NSView
  • From: Keary Suska <email@hidden>
  • Date: Mon, 4 Oct 2010 11:57:32 -0600

On Oct 4, 2010, at 9:22 AM, Thomas Wetmore wrote:

> I have a question based on my confusion over the interacting behaviors of an NSScrollView, its NSClipView and a custom NSView being displayed and clipped.
>
> I have an NSScrollView which resizes as its window resizes. Therefore the NSClipView resizes within the NSScrollView as the the window resizes.
>
> The custom NSView being displayed is small enough in size so that by enlarging the window far enough the NSClipView can become larger than the custom NSView. At this point the custom NSView becomes "locked" to the lower left corner of the NSScrollView and extra space is added to the top and right margins outside the bounds of the custom NSView.
>
> I would like the custom NSView to "float" in the middle of the NSScrollView under these conditions. Other applications seem to implement this behavior. I've been experimenting with settings but haven't been able to figure out how to get what I want.
>
> For the time being I have added the window delegate method windowWillResize:toSize: to force the window to stop growing at the point where the NSClipView reaches the same size as the custom NSView, so at least things look nice and neat, with the scroll bars going inactive at the exact point where the window stops growing, but I'd rather have the floating behavior.
>
> Can anyone offer any advice?

Yes: http://lmgtfy.com/?q=center+view+in+nsscrollview

Keary Suska
Esoteritech, Inc.
"Demystifying technology for your home or business"

_______________________________________________

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

References: 
 >Interacting Sizes of NSScrollView and its NSClipView and a Custom NSView (From: Thomas Wetmore <email@hidden>)

  • Prev by Date: Re: How to get selected text in a WebView
  • Next by Date: clear a CGContextRef in an iPhone app
  • Previous by thread: Interacting Sizes of NSScrollView and its NSClipView and a Custom NSView
  • Next by thread: clear a CGContextRef in an iPhone app
  • Index(es):
    • Date
    • Thread