I have a NStextView set up using IB and i am scaling the clipView by using the following code from the textEdit sample code
- (void)setScaleFactor:(CGFloat)newScaleFactor {
    if (scaleFactor != newScaleFactor) {
        scaleFactor = newScaleFactor;

        NSView *clipView = [[self documentView] superview];
        
        // Get the frame.  The frame must stay the same.
        NSSize curDocFrameSize = [clipView frame].size;
        
        // The new bounds will be frame divided by scale factor
NSSize newDocBoundsSize = {curDocFrameSize.width / scaleFactor, curDocFrameSize.height / scaleFactor};
        
        [clipView setBoundsSize:newDocBoundsSize];
    }
}

However i see a weird behaviour with the vertical scroller some times. What happens is the vertical scroller shows the knob height equal to it's knobRect even though the text view doesn't need any scrolling
Actually it should not display the knob and the scrollbar buttons.
I checked the values of the floatValue and the knobProportion when this happens, which are 0 and 0.9999997 respectively.

I'd appreciate any help.
Thanks
_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]

Reply via email to