Re: Subclass of NSTextView resizes strangely...
Re: Subclass of NSTextView resizes strangely...
- Subject: Re: Subclass of NSTextView resizes strangely...
- From: Marcus Karlsson <email@hidden>
- Date: Mon, 20 Aug 2007 12:47:00 +0200
On 19 aug 2007, at 05.41, Jiva DeVoe wrote:
Howdy, I'm trying to subclass NSTextView to make my own custom view
for a custom IB Palette. Everything works great until I simply
inherit from NSTextView. Once I do this, my view begins to behave
very strangely when being resized (it moves up and down in the
opposite direction of my mouse.)
This is easily reproduced, just start a new IB Palette project, go
to your custom view code, and make it inherit from NSTextView.
Then set your palette up by setting the custom class on a custom
view to your custom view class name, compile it, pull it into ib,
and watch the fun.
You might be able to do this outside of an IB Palette too, I don't
know, I haven't tried.
Anyone have any advice on how to solve this problem? What am I
missing?
Hi.
You will have to put your custom view inside a NSScrollView. It can
be done by selecting the custom view in Interface Builder, select the
Layout menu, Make subviews of, Scroll View.
Marcus
_______________________________________________
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