cannot use two finger scroll in a scrolling group
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller
-
- Livecode Opensource Backer
- Posts: 508
- Joined: Sun Dec 18, 2011 7:23 pm
- Location: London
- Contact:
cannot use two finger scroll in a scrolling group
How can I use two finger scrolling in a scrolling group? Please see attached minimal example.
- Attachments
-
- scrolling in groups.zip
- (828 Bytes) Downloaded 257 times
Kaveh
-
- VIP Livecode Opensource Backer
- Posts: 2718
- Joined: Sat Dec 22, 2007 5:35 pm
- Location: Genève
- Contact:
Re: cannot use two finger scroll in a scrolling group
Hi Kaveh,
I think you have to play with rawkeydown
Just rename your group to "grMyGroup" and copy this script to your group script
Best regards
Jean-Marc
I think you have to play with rawkeydown
Just rename your group to "grMyGroup" and copy this script to your group script
Code: Select all
local sCurScrollGr
on mouseenter
put "grMyGroup" into sCurScrollGr
end mouseenter
on rawkeydown pRawKey
put "65309,65308" into tLesK
if pRawKey is in tLesK then
put 48 into tEmpan
if sCurScroll <> empty then
if the mouseloc is within the rect of group sCurScrollGr then
if pRawKey = 65308 then
put tEmpan into tSec
end if
if pRawKey = 65309 then
put (0-tEmpan) into tSec
end if
set the vscroll of group sCurScrollGr to (the vscroll of group sCurScrollGr)+tSec
end if
end if
else
pass rawkeydown
end if
end rawkeydown
Jean-Marc
https://alternatic.ch
-
- Livecode Opensource Backer
- Posts: 508
- Joined: Sun Dec 18, 2011 7:23 pm
- Location: London
- Contact:
Re: cannot use two finger scroll in a scrolling group
Thank you very much Jean-Marc. That works!
I was hoping there would be native support for two finger scrolling...
Regards
Kaveh
I was hoping there would be native support for two finger scrolling...
Regards
Kaveh
Kaveh
-
- VIP Livecode Opensource Backer
- Posts: 2718
- Joined: Sat Dec 22, 2007 5:35 pm
- Location: Genève
- Contact:
Re: cannot use two finger scroll in a scrolling group
Glad it works
I see
You can use the height of your btns and the margin between them to define the value of tEmpan
Jean-Marc
I see
Code: Select all
put 48 into tEmpan
Jean-Marc
https://alternatic.ch
-
- Livecode Opensource Backer
- Posts: 508
- Joined: Sun Dec 18, 2011 7:23 pm
- Location: London
- Contact:
Re: cannot use two finger scroll in a scrolling group
Hi Jean-Marc
Just a note that today I noticed that in a field in a group that I was using your code for, I could not type a capital A. Although mousedown saw the letter, it did not show in the field.
After tearing my hair out for a while, I found that the culprit was:
So Cap A is 65 and it was caught by the lines!!
I changed to:
otherwise it is working well.
Just a note that today I noticed that in a field in a group that I was using your code for, I could not type a capital A. Although mousedown saw the letter, it did not show in the field.
After tearing my hair out for a while, I found that the culprit was:
Code: Select all
put "65309,65308" into tLesK
if pRawKey is in tLesK then
I changed to:
Code: Select all
if pRawKey is 65309 or pRawKey is 65308 then
Kaveh
-
- VIP Livecode Opensource Backer
- Posts: 2718
- Joined: Sat Dec 22, 2007 5:35 pm
- Location: Genève
- Contact:
Re: cannot use two finger scroll in a scrolling group
Hi Kaveh,
Sorry for your hairs.
good catch i will correct this in my stack
Best
Jean-Marc
Sorry for your hairs.
good catch i will correct this in my stack
Best
Jean-Marc
https://alternatic.ch
-
- VIP Livecode Opensource Backer
- Posts: 2718
- Joined: Sat Dec 22, 2007 5:35 pm
- Location: Genève
- Contact:
Re: cannot use two finger scroll in a scrolling group
Hello,
"among the items of" is a useful way
...
if pRawKey is among the items of "65309,65308" then
...
Best
Jean-Marc
"among the items of" is a useful way
...
if pRawKey is among the items of "65309,65308" then
...
Best
Jean-Marc
https://alternatic.ch