Swipe gesture script on datagrid

Ludovic THEBAULT ludovic.thebault at laposte.net
Tue Jan 19 11:02:20 EST 2021



> Le 19 janv. 2021 à 08:37, Phil Davis via use-livecode <use-livecode at lists.runrev.com> a écrit :
> 
> Would the dgProp["left swipe control"] of grp "yourDG" help? At least that might let you change the default trash can to some other control (maybe to a group that contains your 2 buttons?). If you get that far, maybe the message path of your 2 buttons would go through the DG template row behavior script. I don't know for sure but that would be my first guess.
> 
> 

Thanks.

I add this script in each button of the «right swipe » template : 

on mouseup
   set the idBtn of grp « data grid » to the long id of me
   pass mouseup
end mouseup

And in the behavior script of the grp « data grid » :

on RowRightSwipeControlClicked pTarget
	// just to verify if it’s work
	put ptarget & cr &  the idBtn of grp « data grid » into msg
end RowRightSwipeControlClicked

And it seem to work !

Ludovic





More information about the use-livecode mailing list