• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: How to highlight only part of the text in a text field?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

References: 
 >How to highlight only part of the text in a text field? (From: Ulf Dunkel <email@hidden>)

  • Prev by Date: How to highlight only part of the text in a text field?
  • Next by Date: Re: CALayer instant content update
  • Previous by thread: How to highlight only part of the text in a text field?
  • Next by thread: ScriptingBridge problem
  • Index(es):
    • Date
    • Thread