Skip navigation.
 
mlNSScroller setFloatValue
FROM : Richard Salvatierra
DATE : Tue Aug 01 17:49:23 2006

In a subclass of NSScrollView, I am resizing the bounds of an 
NSClipView in an NSScrollView in order to "Zoom In" on my content where
Content = view with subView of actual content.

I want to set the scroll bars to the center position after I jump to 
a scaled value.  In other words, center
the content after zooming 50%.  Ideally, I would like to call: 
[NSScrollers  setFloatValue; 0.5]; but this of course does not update 
the clipView.

It have read to use:     [[self contentView] scrollToPoint: NSMakePoint
(x,y)];
What would be the center point of the scaled bounds?
   x = NSMidX([[self contentView] frame]);
   y = NSMidY([[self contentView] frame]);

Thank you for your help.
-Rich

Related mailsAuthorDate
No related mails found.