Hallo Anders,
did you receive my message below, because that solves the problem. I
have checked, that in a testproject.
The explanation is: If you set a new max width/height its calculated
and drawn from the origin, which is the lower left edge of your view.
You find more details in the NSView documentation
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 (Cocoa-dev@lists.apple.com)
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/macmeideln%40googlemail.com
This email sent to macmeid...@googlemail.com
_______________________________________________
Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)
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 arch...@mail-archive.com