08-20-2010 04:52 AM
Hello
I am implementing a program that starts a long series of measurements when the Start button is pushed. I would like to add a Stop button in order to let the user abort the measurement process. First, I added a ProcessSystemEvents() in the measuring loop. The problem is that not only the Stop button activates itself but the other (setup, read etc) command buttons too. I would like to deactivate all the buttons except the Stop button. Is there a function like ProcessSystemEvents() but only for ONE command button?
Thanks
Solved! Go to Solution.
08-20-2010 05:16 AM
Hi,
I did not understand what you meant by 'the button actives itself' but you can use the function SetCtrlAttribute (panel_handle, control_id, ATTR_DIMMED, ..) to allow or disallow user input.
08-20-2010 07:34 AM
Exactly what I was looking for! Thanks!
08-20-2010 08:39 AM
Another option is to use GetUserEvent(...) instead of ProcessSystemEvents(), which will provide you with what panel and control the user clicked on. You could then react appropriately if the user pushed the 'Stop' button and ignore all other controls.