Focus and Text Fields
janschenkel at yahoo.com
Sun Oct 8 23:22:38 CDT 2006
--- Richmond Mathewson <geradamas at yahoo.com> wrote:
> Recently I got a bit cheesed-off being unable to
> the cursor in a text box between letters (rather
> the default position - at the start of the string) -
> André Bisseret came to my help - and the result is
> available for download at:
> Thank you very much indeed, André; a huge help in
> area of language teaching!
> sincerely, Richmond Mathewson
[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,
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