Re: How to insert text on button click?
Re: How to insert text on button click?
- Subject: Re: How to insert text on button click?
- From: Jeremy French <email@hidden>
- Date: Thu, 27 Jan 2005 15:01:45 -0500
In the button's action method do the following; also note I'm referring
to the instance of your NSForm object as "myForm":
* figure out which cell has the insertion point with
[myForm selectedCell]
* get a reference to the above cell's current field editor
id theEditor = [[myForm selectedCell] currentEditor]
* now insert the text you want
[theEditor insertText:@"some text to insert"]
On Jan 26, 2005, at 9:40 AM, Magnus Strand wrote:
I have a window with buttons, an NSForm with text fields etc.
When the user clicks a button I would like to insert some characters
where the text caret is blinking.
How can I do this?
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden