Arrows Keys and List Fields
Klaus Major
klaus at major-k.de
Fri Jan 11 12:47:03 EST 2008
Hi Gregory,
> Hello everyone,
>
> I have a list field, and as I use the Up and Down keys, I want to
> display the contents of individual lines in another field. The list
> field's handler below displays the lagged line and not the one that
> was keyed to because the selected line doesn't change until the pass
> arrowKey command is invoked and that has to happen at the end for
> the line to change.
>
> Not sure how to get what I want.
>
> Gregory
>
> on arrowKey theKey
> if theKey is "Up" or theKey is "Down"
> then
> put the value of the selectedLine of the target into fld "Display"
> pass arrowKey
> end if
> end arrowKey
I use to send a "mouseup" to the field.
## In the field:
on mouseup
put the selectedtext of me into fld "Display"
end mouseup
## In the field or anyhwere else:
on arrowKey theKey
if theKey = "Up" or theKey = "Down" then
send "mouseup" to fld "Your field here..." in 5 millisecs
pass arrowKey
end if
end arrowKey
Regards
Klaus Major
klaus at major-k.de
http://www.major-k.de
More information about the use-livecode
mailing list