Re: Controlling Insertion Point
Re: Controlling Insertion Point
- Subject: Re: Controlling Insertion Point
- From: Denis Defreyne <email@hidden>
- Date: Sat, 13 Mar 2004 15:09:43 +0100
On Mar 13, 2004, at 3:25 AM, Bruce Truax wrote:
>
I have a window containing two NSTextViews. The top NSTextView is
>
used for
>
output. The lower NSTextView is used for input. When the window is
>
created
>
I would like the text insertion point to be in the lower window so
>
that the
>
use can start typing commands without first needing to click in the
>
lower
>
NSTextView. I have looked at the NSTextView documentation but there
>
is no
>
obvious method to make this the active view.
You can use NSWindow's makeFirstResponder: to do something like that.
In your window controller, do something like [[self window]
makeFirstResponder:myTextView].
You can also do it with Interface Builder. Make a connection from the
window to the text view and connect it to the initiaFirstResponder
outlet.
Denis Defreyne
--
mail: email@hidden
web:
http://amonre.bedesign.be/
_______________________________________________
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.