- Troy Cowan
- PowerBuilder
- Tuesday, 11 July 2023 05:30 PM UTC
Hi all. I have a request for advice on how to handle a situation.
We have a PowerBuilder app of some complexity. For some reason, some of our users are in the habit of double clicking, rather than single clicking (AKA clicking) on a particular commandbutton on a particular response window. I don't know why, and we can't seem to get them to stop doing this.
Unfortunately, what ends up happening is that the (single) click handler runs, and the second click gets queued up to be handled after the click event finishes. Or that's how it seems to me. One possible outcome of the click handler is to make the entire response window close. Thus, when the event finishes, the button that used to be under the cursor is no longer there, and if the user is unlucky, the cursor is over a different commandbutton on a different window. The handler of that commandbutton's click event runs, much to the surprise of the user.
Aside from training, can anyone think of a way of handling this situation? Ideas we have come up with so far are:
- Employ a "are you sure" type message box on the first commandbutton.
- Move the controls around on the second window so that there is nothing in the space where the cursor would be.
We also tried adding a Sleep() before exiting the first click handler, but it seems like the second click event just stays queued up during the entire click handler, Sleep() and all.
Find Questions by Tag
Helpful?
If a reply or comment is helpful for you, please don’t hesitate to click the Helpful button. This action is further confirmation of their invaluable contribution to the Appeon Community.