steveandrews Posted March 12, 2021 Share Posted March 12, 2021 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 Quote Link to comment Share on other sites More sharing options...
AzeoTech Posted March 13, 2021 Share Posted March 13, 2021 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. Quote Link to comment Share on other sites More sharing options...
steveandrews Posted March 15, 2021 Author Share Posted March 15, 2021 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 Quote Link to comment Share on other sites More sharing options...
AzeoTech Posted March 15, 2021 Share Posted March 15, 2021 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. Quote Link to comment Share on other sites More sharing options...
steveandrews Posted March 16, 2021 Author Share Posted March 16, 2021 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 Quote Link to comment Share on other sites More sharing options...
AzeoTech Posted March 16, 2021 Share Posted March 16, 2021 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. Quote Link to comment Share on other sites More sharing options...
steveandrews Posted March 18, 2021 Author Share Posted March 18, 2021 of course!!! Maybe my caffeine level was too low when i asked that. Thanks! Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.