Handlers for Scrolling List Field

LiveCode is the premier environment for creating multi-platform solutions for all major operating systems - Windows, Mac OS X, Linux, the Web, Server environments and Mobile platforms. Brand new to LiveCode? Welcome!

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
kaveh1000
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 539
Joined: Sun Dec 18, 2011 7:23 pm
Contact:

Handlers for Scrolling List Field

Post 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).
Kaveh
richmond62
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 10415
Joined: Fri Feb 19, 2010 10:17 am

Re: Handlers for Scrolling List Field

Post 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 456 times
kaveh1000
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 539
Joined: Sun Dec 18, 2011 7:23 pm
Contact:

Re: Handlers for Scrolling List Field

Post 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?
Kaveh
PBH
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 135
Joined: Sun Feb 20, 2011 4:26 pm
Contact:

Re: Handlers for Scrolling List Field

Post 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
Post Reply