Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
Bedrock Mission!

Learn more

View all

Sign in to view all badges

SOLVED

Where is the Double-click Event in Adobe LiveCycle Designer

Avatar

Level 1

Hi Experts:

I was trying to put code into a Double Click event in Adobe LiveCycle Designer, but couldn't find the Event. There is a "Click" event, but that won't do.

Am I missing something here?

Thanks,

Jen

1 Accepted Solution

Avatar

Correct answer by
Level 10

Hi Jen,

I was surprised the double click was missing but I use the following code in the click event, just replace the "[my double click code ]" and "[ my single click code ]" with your single and double click code.  This code delays the single click event for 400ms to see if a second click is coming, you might want to play around with the 400ms as you have to balance the responsiveness of a single click with the double click.

if (new Date() - this.date < 400)

{

    app.clearTimeOut(this.timeout);

    this.date = undefined;

    [my double click code ]

}

else

{

    if (xfa.event.fullText !== "singleClick")

    {

        this.timeout = app.setTimeOut("xfa.event.fullText='singleClick';xfa.resolveNode('"+this.somExpression+"').execEvent('click');",500);

    }

    else

    {

        [ my single click code ];

    }

}

this.date = new Date();

View solution in original post

9 Replies

Avatar

Level 10

Designer forms do not have a Double click event. You only have Click event.

Thanks

Srini

Avatar

Level 1

But that seems very limited. Is there a workaround or a custom solution?

Avatar

Level 10

I do see a reason a double click is useful.

You have fields and buttons in Designer, the same things you have onto a website and in other programs.

And for those you also don't need a double click.

Avatar

Level 10

What's limiting about single vs. double clicking? Just curious...

I imagine you could come up with some sort of custom solution involving a counter and timeouts or something like that, but not sure.

Avatar

Level 1

The desire is to have a text field (cell in a table) double clicked and a popup box to come up so text can be entered and stored with the cell. But not always.

If we are limited to a single click, how do we get into a cell, but not want the popup box?

Avatar

Level 10

You can use a script in the click:event of the field to identify if the shift key is pressed down, when clicking into the field.

if (xfa.event.shift == true)

     {

     script to execute if shift is pressed

     }

Avatar

Correct answer by
Level 10

Hi Jen,

I was surprised the double click was missing but I use the following code in the click event, just replace the "[my double click code ]" and "[ my single click code ]" with your single and double click code.  This code delays the single click event for 400ms to see if a second click is coming, you might want to play around with the 400ms as you have to balance the responsiveness of a single click with the double click.

if (new Date() - this.date < 400)

{

    app.clearTimeOut(this.timeout);

    this.date = undefined;

    [my double click code ]

}

else

{

    if (xfa.event.fullText !== "singleClick")

    {

        this.timeout = app.setTimeOut("xfa.event.fullText='singleClick';xfa.resolveNode('"+this.somExpression+"').execEvent('click');",500);

    }

    else

    {

        [ my single click code ];

    }

}

this.date = new Date();

Avatar

Level 1

BR0001:

You are crafty! That worked for me exactly.

Thank you very much,

Jen