Sign in to follow this  
steveandrews

disable click temporarily

Recommended Posts

Hi,

I have a few instances where a user clicks on something in a pop-up and the popup closes but the click is registered on the item beneath the pop-up.

A common one is a user entry for loading a file with system. if the user selects a file and clicks 'open' it's fine. But the tendency is to double click an item in the explorer window, which opens it, closes the system.entrydialog box but then registers a click on an item on the daqfactory screen underneath.

I'm sure ive seen some kind of disable click function, but cant find it. Can you suggest a way to 'protect' items from being accidently clicked on? i dont want to disable individual components as thats too much work, rather suppress a mouse click   

 

cheers

Steve

Share this post


Link to post
Share on other sites

You can just specify the location of the popup on the screen so that its close buttons doesn't overlap with any buttons underneath.  This is a common issue on many programs, especially with touch screens and why I stagger buttons when switching between main pages.

 

Share this post


Link to post
Share on other sites

yeah, I can't really do that as the open file dialog is quite big, and there are many files in the list that can be double clicked, so will always overlap with something.

is there no way to disable mouse input for half a second or so?

Cheers

Share this post


Link to post
Share on other sites

Not directly.  Really you'd just have to switch the main screen to a blank page and then switch back.  You could also switch to a copy of the current page that has the actions removed, then switch back.

The only other alternative I can think of would be to modify all your actions to check a flag that you set when the popup is displayed.  But that would be cumbersome if you had a lot of actions.

Share this post


Link to post
Share on other sites

thanks, I could implement the last suggestion, as a lot of the actions are locked out by default already and i always use quick sequences for actions so wouldn't take much to add a few lines to them, although not sure how i would add a flag to a system dialog box such as load file? The others i could use the: page.pagename.ispoppedup 

Share this post


Link to post
Share on other sites

Well, how are you triggering the system dialog box?  If you are doing, for example: file.fileOpenDIalog(), you would simply do:

myFlag = 1
file.fileOpenDIalog()
myFlag = 0

The fileOpenDIalog() function is blocking while the popup is displayed.

 

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this