• 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: is setting the document view size supported?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSScrollView: is setting the document view size supported?


  • Subject: Re: NSScrollView: is setting the document view size supported?
  • From: Luke Evans <email@hidden>
  • Date: Tue, 10 Feb 2009 00:53:19 -0800

Hey guys - thanks.

OK, I was setting bounds rather than frame. Oops.
Now I don't have the weird zoom effect of the content growing to fit the clip view, but I do have the content marching down relative to the clip view as I switch back and forth between small and large content. I think this is expected behaviour though as I see that you have to take care to preserve the frame position in these circumstances. So, looks like it's just more experimentation and accustomisation that I need now :-)



On 9-Feb-09, at 8:05 PM, Andy Lee wrote:

On Feb 9, 2009, at 9:26 PM, Eric Gorr wrote:
On Feb 9, 2009, at 9:07 PM, Luke Evans wrote:

My experiments suggest that simply setting the current document view in an NSScrollView to a new size results in the unexpected behaviour (to me) of having all the content of the document view be scaled up or down to fit the size of the NSClipView.

I am not certain exactly what you are doing, but I have been able to successfully do this.

Works for me too. I hooked up a button to do the following and it works just fine.


NSView *docView = [_scrollView documentView];
NSSize oldFrameSize = [docView frame].size;
[docView setFrameSize:NSMakeSize(oldFrameSize.width + 10.0, oldFrameSize.height + 10.0)];


Are you sure you're not accidentally doing something with the clip view?

--Andy


_______________________________________________

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: 
 >NSScrollView: is setting the document view size supported? (From: Luke Evans <email@hidden>)
 >Re: NSScrollView: is setting the document view size supported? (From: Eric Gorr <email@hidden>)
 >Re: NSScrollView: is setting the document view size supported? (From: Andy Lee <email@hidden>)

  • Prev by Date: Re: Transparent image
  • Next by Date: Subclassing NSMatrix to tile with hexagons
  • Previous by thread: Re: NSScrollView: is setting the document view size supported?
  • Next by thread: [MEET] Minnesota CocoaHeads 2/12/09
  • Index(es):
    • Date
    • Thread