Re: Swipe gesture script on datagrid

2021-01-19 Thread Mark Smith via use-livecode
Or “RowRightSwipeControlClicked” in your case. It depends on how you invoke the 
action control.

> On Jan 19, 2021, at 4:18 PM, Mark Smith  wrote:
> 
> Yes, that’s how it’s done. And then in your row behavior script respond to
> on EditModeActionControlClicked pTarget
> 
> with pTarget containing the short name of your action control button.
> 
> 
> 
>> On Jan 19, 2021, at 7:37 AM, Phil Davis via use-livecode 
>> mailto:use-livecode@lists.runrev.com>> wrote:
>> 
>> 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.
>> 
>> Phil Davis
>> 
>> 
>> On 1/18/21 10:28 PM, Ludovic THEBAULT via use-livecode wrote:
>>> Hello,
>>> 
>>> How edit the script of a swipe gesture control ?
>>> I want to add two buttons to the right swipe control, it’s ok for 
>>> appearance but I cannot find where to edit the script.
>>> 
>>> Is it even possible?
>>> 
>>> PS : i have datagrid helper plugin 2.5.
>>> 
>>> Thanks !
>>> ___
>>> use-livecode mailing list
>>> use-livecode@lists.runrev.com 
>>> Please visit this url to subscribe, unsubscribe and manage your 
>>> subscription preferences:
>>> http://lists.runrev.com/mailman/listinfo/use-livecode
>> 
>> -- 
>> Phil Davis
>> 503-307-4363
>> 
>> 
>> ___
>> use-livecode mailing list
>> use-livecode@lists.runrev.com 
>> Please visit this url to subscribe, unsubscribe and manage your subscription 
>> preferences:
>> http://lists.runrev.com/mailman/listinfo/use-livecode
> 

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: Swipe gesture script on datagrid

2021-01-19 Thread Mark Smith via use-livecode
Yes, that’s how it’s done. And then in your row behavior script respond to
on EditModeActionControlClicked pTarget

with pTarget containing the short name of your action control button.



> On Jan 19, 2021, at 7:37 AM, Phil Davis via use-livecode 
>  wrote:
> 
> 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.
> 
> Phil Davis
> 
> 
> On 1/18/21 10:28 PM, Ludovic THEBAULT via use-livecode wrote:
>> Hello,
>> 
>> How edit the script of a swipe gesture control ?
>> I want to add two buttons to the right swipe control, it’s ok for appearance 
>> but I cannot find where to edit the script.
>> 
>> Is it even possible?
>> 
>> PS : i have datagrid helper plugin 2.5.
>> 
>> Thanks !
>> ___
>> use-livecode mailing list
>> use-livecode@lists.runrev.com
>> Please visit this url to subscribe, unsubscribe and manage your subscription 
>> preferences:
>> http://lists.runrev.com/mailman/listinfo/use-livecode
> 
> -- 
> Phil Davis
> 503-307-4363
> 
> 
> ___
> use-livecode mailing list
> use-livecode@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription 
> preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: Swipe gesture script on datagrid

2021-01-19 Thread Ludovic THEBAULT via use-livecode


> Le 19 janv. 2021 à 08:37, Phil Davis via use-livecode 
>  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


___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: Swipe gesture script on datagrid

2021-01-18 Thread Phil Davis via use-livecode
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.


Phil Davis


On 1/18/21 10:28 PM, Ludovic THEBAULT via use-livecode wrote:

Hello,

How edit the script of a swipe gesture control ?
I want to add two buttons to the right swipe control, it’s ok for appearance 
but I cannot find where to edit the script.

Is it even possible?

PS : i have datagrid helper plugin 2.5.

Thanks !
___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


--
Phil Davis
503-307-4363


___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: Swipe gesture script on datagrid

2021-01-18 Thread Ludovic THEBAULT via use-livecode


> Le 19 janv. 2021 à 07:28, Ludovic THEBAULT  a 
> écrit :
> 
> Hello,
> 
> How edit the script of a swipe gesture control ?
> I want to add two buttons to the right swipe control, it’s ok for appearance 
> but I cannot find where to edit the script.
> 
> Is it even possible?


I dug into the dictionary and found : RowRightSwipeControlClicked



___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode