Page 1 of 1

Handlers for Scrolling List Field

Posted: Fri Apr 14, 2017 3:22 pm
by kaveh1000
I am looking for the handler that tells a scrolling list field that the selected line has changed (using arrow keys of mouse).

Re: Handlers for Scrolling List Field

Posted: Fri Apr 14, 2017 4:41 pm
by richmond62
First of all let me say that I don't know what you mean by "arrow keys of mouse".

This:
lnclick.png
Might be the sort of thing you're looking for: I hope so.
Line Clicker.livecode.zip
Here's the stack.
(1.07 KiB) Downloaded 103 times

Re: Handlers for Scrolling List Field

Posted: Fri Apr 14, 2017 9:50 pm
by kaveh1000
I am so sorry. I meant "arrow keys OR mouse" :-( Sorry for the inadvertent time wasting!!

So if I click on a line, I can use a mouseup handler to get the line clicked and act accordingly.

But what if a line is selected already and I use the up or down arrow keys to move to another line? What is the handler to detect the new line selected?

Re: Handlers for Scrolling List Field

Posted: Sat Apr 15, 2017 1:44 am
by PBH
You should find that selectionChanged will do what you need.

e.g. Field Script:

Code: Select all

on selectionChanged
   put the selectedLine into fld "myChoiceField"
end selectionChanged
Paul