how to set the cursor position in TextMorph

Gary Chambers gazzaguru at btinternet.com
Thu May 11 20:25:18 UTC 2006


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 at lists.squeakfoundation.org
> [mailto:squeak-dev-bounces at 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 at lists.squeakfoundation.org
> > [mailto:squeak-dev-bounces at lists.squeakfoundation.org]On Behalf Of Celal
> > Ziftci
> > Sent: 11 May 2006 3:34 AM
> > To: squeak-dev at 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.
> >
> >
>
>




More information about the Squeak-dev mailing list