Click vs space bar event


Amin Mousavi

Hi David,

In one of the Views I have put an some lines of code on the click event of the view itself. In fact I have a button that appears in some situations and I wanted to allow user to click elsewhere to hide it and I did it by writing the code on view's click event. This part works great, the issue it causes though is that space bar also acts as click now, so when in the inputs available in the view a space is needed, instead of having a white space, click event is fired, I was wondering is there away that I can read the space bar event and perhaps put an exception in the click event? something like below:

I assume like this space bar gets back to do what it was doing?

Thanks a mill


DecSoft

Hello Amin,

Curious behaviour... Certainly we can ride on it by a code like the below one in the View's Click event:



Amin Mousavi

Hi David,

Thanks for your great support, got it sorted! It just needed one more line of code! So because Space bar was firing the click event instead of spacing, I had to add the space when it was pushed manually, like below:


DecSoft

Hello Amin,

You are right. I just don't know about this "space bar" behaviour, but, in some cases, certainly we must look at that.


Everybody can read the DecSoft support forum for learning purposes, however only DecSoft customers can post new threads. Purchase one or more licenses of some DecSoft products in order to give this and other benefits.

This website uses some useful cookies to store your preferences.

I agree. Hide this note. Give me more information.