• 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
Scrolling of NSTextView messed up
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Scrolling of NSTextView messed up


  • Subject: Scrolling of NSTextView messed up
  • From: John Nairn <email@hidden>
  • Date: Fri, 29 Jul 2005 11:09:31 +0200

I programmatically created an NSTextView in an NSScrollView. It displays correctly but when doing scrolling the text is all messed up including distortions of the text and multiple display of the same line, etc. Here is code fragment that creates the views (the [self contentRect]] method return a rect from the contentSize of the scroll view):

NSRect scrollFrame=NSMakeRect(hoff,voff,161.,58.);
NSScrollView *scrollFld=[[NSScrollView alloc] initWithFrame:scrollFrame];
[scrollFld setHasHorizontalScroller:NO];
[scrollFld setHasVerticalScroller:YES];


NSTextView *textFld=[[NSTextView alloc] initWithFrame:[self contentRect:scrollFld]];
[textFld setString:initiatlStringContents];
[textFld setEditable:YES];


        [scrollFld setDocumentView:textFld];
        [textFld release];

        [myMainView addSubview:scrollFld];
        [scrollFld release];

---------------
John Nairn (1-801-581-3413, FAX:1-801-581-4816)
Web Page: http://www.mse.utah.edu/~nairn

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Prev by Date: Re: [Core Data - Newbie] Custom validation method called twice.
  • Next by Date: New looks replacing Metal?
  • Previous by thread: Re: Regex? Need to style portions of text that are not all the same
  • Next by thread: New looks replacing Metal?
  • Index(es):
    • Date
    • Thread