PxPlus User Forum

Main Board => Discussions => Language => Topic started by: James Zukowski on November 06, 2023, 10:46:43 AM

Title: Track Single- and Double-Click in Report View
Post by: James Zukowski on November 06, 2023, 10:46:43 AM
Is it possible to get both a single and double click in a Report View listbox? I've been able to get the single by setting Signal All Changes, but when I do that, I can't double-click; it always responds as if it's a single click. When I don't set it, I can get the double but not the single.
Any ideas?
Title: Re: Track Single- and Double-Click in Report View
Post by: PxPlus on November 06, 2023, 11:07:55 AM
I just created a Nomads panel with a Report view list that had Signal all changes and an OnClick event of SETTRACE PRINT "Click == _EOM$="+HTA(_EOM$).

It showed I first get $01$ then $02$ when I double click any item is the list.  The $01$ is the first click, $02$ for the second.

I used settrace print to make sure I didn't do anything that would move focus off the control between clicks, sure as displaying a Message Box.
Title: Re: Track Single- and Double-Click in Report View
Post by: James Zukowski on November 06, 2023, 12:01:07 PM
It's good to know the double-click is getting through. Unfortunately, it's after the single-click has been processed. Would I then have to test for the double-click in my single-click logic? Or is there something else that could be done?
Title: Re: Track Single- and Double-Click in Report View
Post by: PxPlus on November 06, 2023, 04:23:15 PM
You would need to test for _EOM$ = $02$ in your 'change/Click' logic.

Actually I generally test for $02$ or $0D$ which is double click or ENTER thus allowing clients which don't want to use a mouse or how have trouble clicking twice rapidly to use the keyboard and just press enter.
Title: Re: Track Single- and Double-Click in Report View
Post by: James Zukowski on November 06, 2023, 05:09:38 PM
I'm already dealing with multiple options. What seems to get it through, though, is including No_Flush=1 when I'm dealing with a single click and returning to the same listbox for further action. Together with your test showing the double-click follows the single-click in the input stream, this looks like it makes everything work the way we want.

Thanks for the tips.