That's what I was going to suggest. The advantage is that selectionChanged works for everything: arrow keys, mouse clicks, taps on mobile, etc. And I think scripted changes too if I remember right.

--
Jacqueline Landman Gay         |     [email protected]
HyperActive Software           |     http://www.hyperactivesw.com



On April 22, 2016 5:53:26 PM BNig <[email protected]> wrote:

Sannyasin Brahmanathaswami wrote
If you use the arrow key on a list field, the selected line in the fld is
the line that was selected before the arrow key

So if you traverse a list up and down with the arrow keys, the selected
line is always “one line behind” so to speak

on arrowKey
   put value (the selectedline of me) # is not the line you land on
   pass arrowkey
end arrowkey

Is this a bug? If not a bug is there a simple way to get the value of the
line the arrow key landed on and not the one that it just left behind? I
can resort to parsing the line, determining if the user when up or down
and then adding and subtracting 1… but that seems very hacky… is there a
simpler way?

BR

Would

-------------
on selectionChanged
   put the hilitedText
end selectionChanged
-------------

do what you want for a list field?

Kind regards

Bernd



--
View this message in context: http://runtime-revolution.278305.n4.nabble.com/Arrow-Keys-on-List-Fields-The-Selected-hilited-Line-tp4703770p4703775.html
Sent from the Revolution - User mailing list archive at Nabble.com.

_______________________________________________
use-livecode mailing list
[email protected]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode



_______________________________________________
use-livecode mailing list
[email protected]
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

Reply via email to