Re: How to highlight only part of the text in a text field?
Re: How to highlight only part of the text in a text field?
- Subject: Re: How to highlight only part of the text in a text field?
- From: Vincent Habchi <email@hidden>
- Date: Mon, 13 Sep 2010 16:56:57 +0200
Le 13 sept. 2010 à 16:46, Ulf Dunkel a écrit :
> 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?
Look at NSTextViewDelegate methods, especially:
- (NSRange)textView:(NSTextView *)aTextView
willChangeSelectionFromCharacterRange:(NSRange)oldRange toCharacterRange:(NSRange)newRange
Vincent
PS: Is calamus.net the same editor that was selling the Calamus application for Atari ST so long ago?_______________________________________________
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