NSTextView frame issue inside NSTableView
NSTextView frame issue inside NSTableView
- Subject: NSTextView frame issue inside NSTableView
- From: "email@hidden" <email@hidden>
- Date: Thu, 06 Sep 2012 23:42:53 +0800
I want to put a attributed string on a nstextview, and manually calculate the height of the textview and row
-(CGFloat)tableView:(NSTableView *)tableView heightOfRow:(NSInteger)row
inside
-(NSView *)tableView:(NSTableView *)tableView viewForTableColumn:(NSTableColumn *)tableColumn row:(NSInteger)row
I update frame of TextView,
textView.frame = CGRectMake(57.0f, 36.0f-height, 380.0f, height);
height is the calculated result for NSTextView.
everything is fine for the first time,
but if I scroll, the TextView starts move down,
it has been bugs me for a day, does anyone knows why? thanks in advance.
--
email@hidden
Sent with Sparrow (http://www.sparrowmailapp.com/?sig)
_______________________________________________
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