-----Original Message----- From: squeak-dev-bounces@lists.squeakfoundation.org [mailto:squeak-dev-bounces@lists.squeakfoundation.org] On Behalf Of Gary Chambers Sent: Thursday, May 11, 2006 4:25 PM To: The general-purpose Squeak developers list Subject: RE: how to set the cursor position in TextMorph
If you want to use a TextMorph try the following:
myTextMorph editor selectFrom: 2 to: 1. ActiveHand newKeyboardFocus: myTextMorph. myTextMorph changed
-----Original Message----- From: squeak-dev-bounces@lists.squeakfoundation.org [mailto:squeak-dev-bounces@lists.squeakfoundation.org]On Behalf Of Gary Chambers Sent: 11 May 2006 7:11 PM To: The general-purpose Squeak developers list Subject: RE: how to set the cursor position in TextMorph
Sorry, that was for PluggableTextMorph. Better to use the pluggable version IMO.
-----Original Message----- From: squeak-dev-bounces@lists.squeakfoundation.org [mailto:squeak-dev-bounces@lists.squeakfoundation.org]On Behalf Of Celal Ziftci Sent: 11 May 2006 3:34 AM To: squeak-dev@lists.squeakfoundation.org Subject: Re: how to set the cursor position in TextMorph
I think a TextMorph doesnt have such a method called 'setSelection'. I tried running it but it doesn't understand the message. Thanks for the response though.
- Celal
How about
myTextMorph setSelection: (7 to: 6)
Or change the range to have a selection instead of a caret.
beginners@lists.squeakfoundation.org