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: Klaus, FourthWorld, heatherlaine, robinmiller, kevinmiller

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

Handlers for Scrolling List Field

Post by kaveh1000 » Fri Apr 14, 2017 3:22 pm

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: 3351
Joined: Fri Feb 19, 2010 10:17 am
Location: Bulgaria

Re: Handlers for Scrolling List Field

Post by richmond62 » Fri Apr 14, 2017 4:41 pm

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 96 times

kaveh1000
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 267
Joined: Sun Dec 18, 2011 7:23 pm
Location: London
Contact:

Re: Handlers for Scrolling List Field

Post by kaveh1000 » Fri Apr 14, 2017 9:50 pm

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: 95
Joined: Sun Feb 20, 2011 4:26 pm
Location: Vancouver Island, BC, Canada. ex.UK
Contact:

Re: Handlers for Scrolling List Field

Post by PBH » Sat Apr 15, 2017 1:44 am

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

Return to “Getting Started with LiveCode - Experienced Developers”