Adding cursor event for a list

  Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Post Reply
baza_dwa Offline
Member
Posts: 91
Joined: Feb 2017
Reputation: 0
Post: #1
There is a horizontal list, so left-right arrows scroll it. All's OK.

Now, can I tap into scrolling with my own events somehow? Defining <onleft> <onright> seems to do nothing.
find quote
jurialmunkey Offline
Skilled Skinner
Posts: 2,303
Joined: Feb 2013
Reputation: 214
Post: #2
You can use a fake button to control the list and supply additional actions e.g.
<onleft>Control.Move(ID,-1)</onleft>
<onleft>ADDITIONAL_ACTION</onleft>

The alternative is to use a hidden button in the <focusedlayout> with an <onfocus> condition. But that will just trigger something when the list moves - i.e. you won't be able to define separate actions for left and right individually.
find quote
baza_dwa Offline
Member
Posts: 91
Joined: Feb 2017
Reputation: 0
Post: #3
Thanks, I'll redesign and use 2nd approach (didn't know that focusable items are allowed on lists).
find quote
jurialmunkey Offline
Skilled Skinner
Posts: 2,303
Joined: Feb 2013
Reputation: 214
Post: #4
They aren't really (you will get an error in the log) and you can't use it for official repo submission, but they do work as a hack for an onfocus command
find quote