Re: NSTextView Custom Class "Not Applicable"
Re: NSTextView Custom Class "Not Applicable"
- Subject: Re: NSTextView Custom Class "Not Applicable"
- From: Peter Horn <email@hidden>
- Date: Mon, 15 Apr 2002 19:44:28 +0200
Hi!
I wrote a NSTextView subclass, Interface Builder knows about it,
but in the
"Custom Class" pane of the info window of the NSTextView I only
can see the
text "Not Applicable".
I had this problem, too. The problem is, that you have an
NSTextView inside an NSClipView inside an NSScrollView. So what you
need to do, is:
// get the right size
NSSize contSize = [scrollView contentSize];
// init new view with correct size
customView = [[XXCustomView alloc]
initWithFrame:NSMakeRect(0.0, 0.0, contSize.width,
contSize.height)];
// correctly set the resizing
[customView setAutoresizingMask:NSViewWidthSizable |
NSViewHeightSizable];
// insert the newly created view into the scrollView
[scrollView setDocumentView:customView];
Regards,
Peter
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.