changing focus
Posted: Wed Aug 21, 2013 1:09 am
Hi, I have a stack with three text entry field called WINS, LOSSES, RESULT. I
want to be able to enter number in WINS and when pressing Enter the focus would
go to LOSSES and then I would enter number in LOSSES and then clicking a button
would get me the result.
Here is what I've done in the card script I have
- on opencard
focus on field wins
end opencard
this works.
then I used in the WINS text entry field script
- on returnkey
focus on field losses
end returnkey
this does not work, it only erase my entry and focus stays in WINS. No errors
If I use button to change focus this works but I thought just having the text
field looks cleaner.
I've read all I could on FOCUS and RETURNKEY but it did not help. I am fairly new at using LiveCode and know there is probably better ways to do what I want. Can anybody stir me the right way. TIA
byg
want to be able to enter number in WINS and when pressing Enter the focus would
go to LOSSES and then I would enter number in LOSSES and then clicking a button
would get me the result.
Here is what I've done in the card script I have
- on opencard
focus on field wins
end opencard
this works.
then I used in the WINS text entry field script
- on returnkey
focus on field losses
end returnkey
this does not work, it only erase my entry and focus stays in WINS. No errors
If I use button to change focus this works but I thought just having the text
field looks cleaner.
I've read all I could on FOCUS and RETURNKEY but it did not help. I am fairly new at using LiveCode and know there is probably better ways to do what I want. Can anybody stir me the right way. TIA
byg