Re: Why does IB insist on putting NSTextView in an NSScrollView
Re: Why does IB insist on putting NSTextView in an NSScrollView
- Subject: Re: Why does IB insist on putting NSTextView in an NSScrollView
- From: Jerry Krinock <email@hidden>
- Date: Sat, 16 Jan 2010 21:35:41 -0800
On 2010 Jan 16, at 14:34, Fritz Anderson wrote:
> On 16 Jan 2010, at 3:25 PM, Jerry Krinock wrote:
>
>> Now I know that NSTextViews are not required to be in NSScrollViews, because I have created NSTextViews in code, added them to a view and they work fine. And I don't see any such requirement in any documentation. Is there any good reason why Interface Builder insists that an NSTextView be enclosed in an NSScrollView?
>
> Select the enclosing NSScrollView. Select Layout > Unembed Objects.
Thank you, Fritz. It sort of works, but raises new issues.
First of all, you can only do this upon initially inserting the NSScrollView+NSTextView. After you've moved it around some, with the scroll view selected, the Unembed Objects menu item becomes disabled. Sometimes it will re-enable if you move it some more, sometimes it won't.
What's worse, though, is that after you Unembed Objects, the resulting NSTextView is immobile. Select it, show Inspector, tab to "Size", and you'll see that all four coordinates x, y, w and h are disabled, both "Bounds" and "Frame". And the numbers in there are slightly different than what the scroll view's were, by a few pixels. So you can't put it exactly where you need it. I tried twice to reverse-engineer it, setting the scroll view frame to be slightly different than where I want the text view, but couldn't guess the magic numbers.
Can anyone explain these "features"? I don't want a view that I can't move around in a future version.
Jerry
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden