Re: NSTextView moves when being resized ???
Re: NSTextView moves when being resized ???
- Subject: Re: NSTextView moves when being resized ???
- From: Reinhard Segeler <email@hidden>
- Date: Sat, 29 Aug 2009 16:20:29 +0200
The coordinate-system for a view starts with the lower left corner,
not at the upper left. There is command, that sets the coordinate
system to the upper left corner, but I can't find it right now. But I
guess, that the first info is what you need to know.
Reinhard
Am 29.08.2009 um 12:38 schrieb Anders Lassen:
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@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
_______________________________________________
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