Re: Subclass of TextView in ScrollView
Re: Subclass of TextView in ScrollView
- Subject: Re: Subclass of TextView in ScrollView
- From: Mason Mark <email@hidden>
- Date: Fri, 14 Dec 2001 03:48:51 -0800
On 12/13/01 11:13 AM, "Gerriet M. Denkmann" <email@hidden> wrote:
>
I have an document based app with a window with a ScrollView with a
>
TextView.
>
>
But now I would like to have a subclass MyTextView inside the ScrollView.
>
>
Is there a way to do this inside IB?
>
Or do I have to replace the TextView with MyTextView progrmmatically
>
(e.g. in windowControllerDidLoadNib:) ?
You can use IB to do this, but not by dragging the normal NSTextView widget
from the palette to your window.
I've done this before by dragging a Custom View into my window, using the
inspector to set its class to MyTextView, then choosing Make Subviews
Of->Scroll view from the Layout menu.
Since you still cannot inspect the custom text view's properties in IB,
though, it is only marginally more convenient than replacing the view
programmatically (if at all).
--
Mason