• 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
NSTextView's scroller problem when scaling
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

NSTextView's scroller problem when scaling


  • Subject: NSTextView's scroller problem when scaling
  • From: chaitanya pandit <email@hidden>
  • Date: Wed, 3 Sep 2008 20:46:13 +0530

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 (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


  • Prev by Date: Re: NSInteger
  • Next by Date: Changing the default audio output hardware
  • Previous by thread: Re: NSInteger
  • Next by thread: Changing the default audio output hardware
  • Index(es):
    • Date
    • Thread