How to highlight only part of the text in a text field?
How to highlight only part of the text in a text field?
- Subject: How to highlight only part of the text in a text field?
- From: Ulf Dunkel <email@hidden>
- Date: Mon, 13 Sep 2010 16:46:29 +0200
- Organization: invers Software
When I open an openPanel in any application, I often see the file name
field's content partly highlighted (or name it pre-selected), e.g.
"[myFileName].extension"
where the string part in [] is already selected and ready to be
overwritten, keeping the ".extension" part untouched by default.
I would like to use a similar behaviour in an editable text field of my
document window, which I activate when the window is shown, using
[mainWindow makeFirstResponder:myTextField];
The myTextField content has already be composed (like e.g. @"foo: bar").
I would like to see only "bar" preselected when the window opens and the
myTextField is selected for editing.
I guess you folks know how to, while I poke through the documentation.
Can you help me out?
Thanks in advance,
Ulf Dunkel
_______________________________________________
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