Hi,
I am working on a custom view that consists of a column of several
NSTextViews. In between, there are graphics and some other stuff that
require special editing.
Therefore I cannot use a single NSTextView.
The NSTextView must adopt its height to the content. This works fine
using the code as listed below.
But the problem is, that the NSTextView control moves downwards when
the size is changed.
textView = [[NSTextView alloc] initWithFrame:NSMakeRect(100, 100,
300, 200)];
[self addSubview:textView];
[textView setVerticallyResizable:YES];
[textView setAutoresizingMask NSViewHeightSizable];
[textView setMinSize:NSMakeSize(0.0, 100.0)];
[textView setMaxSize:NSMakeSize(FLT_MAX, FLT_MAX)];
I have read about others having the same problem, but I did not find a
solution.
Note that the NSTextView is a subview to a custom view, that is the
content view of a NSScrollView. But this does not matter - I think.
Hope someone can help on this.
Kind regards,
Anders Lassen
_______________________________________________
Cocoa-dev mailing list ([email protected])
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]