How do I check which field has the focus on / is active?

William de Smet williamdesmet at gmail.com
Fri Oct 30 09:14:00 EDT 2009


Hi there all,

How do I check which has the focus on / is the active one?
When I use: 'answer the selectedField' it shows me the correct field
but when I put the next code into a button it doesn't work anymore:
--
on mouseUp
put the name of the selectedField into tData

if tData = "number1"
then send mouseup to btn "check"

 if tData = "number3"
then send mouseup to btn "sum1"

 if tData = "number6"
then send mouseup to btn "sum2"

 if tData = "number9"
then send mouseup to btn "sum3"

if tData = "number12"
then send mouseup to btn "sum4"

if tData = "number15"
then send mouseup to btn "sum5"
end mouseUp

--

Thanks!

Greetings, William



More information about the use-livecode mailing list