Focus and Text Fields

Jan Schenkel janschenkel at
Mon Oct 9 00:22:38 EDT 2006

--- Richmond Mathewson <geradamas at> wrote:
> Recently I got a bit cheesed-off being unable to
> focus
> the cursor in a text box between letters (rather
> than
> the default position - at the start of the string) -
> André Bisseret came to my help - and the result is
> now
> available for download at:
> Thank you very much indeed, André; a huge help in
> the
> area of language teaching!
> sincerely, Richmond Mathewson

Hi Richmond,

[This reply didn't get through it seems]

The result of the 'focus' command depends on the
'autoTab' property of the field. If the 'autoTab' is
true, then the entire text of the field will be
selected, and pressing return will automatically send
you off to the next field.

In this case, you'll want to use the 'select' command:
- to select behind all the text in a field 
  => select after field "foobar"
- to select in front of the text in a field 
  => select before field "foobar"
- to select a specific character in a field
  => select char 12 of field "foobar"
- to select a chunk of text in a field
  => select char 10 to 20 of field "foobar"
  => select word 2 to 3 of field "foobar"
  => select item 2 to 3 of line 6 of field "foobar"
- to put the caret between two characters
  => select char 4 to 3 of field "foobar"

Hope this helped,

Jan Schenkel.

Quartam Reports for Revolution

"As we grow older, we grow both wiser and more foolish at the same time."  (La Rochefoucauld)

Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 

More information about the Use-livecode mailing list