Selected text in NSTextField
Selected text in NSTextField
- Subject: Selected text in NSTextField
- From: Dany Golubitsky <email@hidden>
- Date: Tue, 31 Jan 2012 03:14:41 -0500
- Acceptlanguage: en-US
- Thread-topic: Selected text in NSTextField
Hello Everyone!
I am interested in opening NSAlert window that includes editable text field. I would like that the text field will be immediately in focus and all characters will be selected. Meaning that the user can immediately start to type another name if he interested.
In other words it should look like this:
http://i30.fastpic.ru/big/2012/0131/9d/33a982de75d6e7221508f41902504b9d.png
I tried to use both NSTextField with selectText:0 and NSTextView with setSelectedRange:range. It still looks like this:
http://i28.fastpic.ru/big/2012/0131/82/f6e1e63c6dccb5170f892ad8f19a2a82.png
I also tried to use becomeFirstResponder - still, you need to click inside the text field in both cases in order to start editing.
Can someone help?
Thanks!
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden