Scrolling of NSTextView messed up
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