01-23-2018 03:24 PM
Hi,
I've developed a custom TestStand Operator Interface based on Simple UI. I was required to add an confirmation dialogue box when user click on terminate/restart button before the sequence starts terminating. We have lots of incidents that the user accidentally touched the touchpad on the wireless keyboard causes the sequence to terminate.
Can someone please show me how to do it? I found that the terminate/restart button is linked to the command during configuration. It seems that there is no way I can intervene the event firing. Thanks in advance.
Solved! Go to Solution.
01-24-2018 07:26 AM
@STIJDM wrote:
[...] I found that the terminate/restart button is linked to the command during configuration. It seems that there is no way I can intervene the event firing. Thanks in advance.
You are correct that when using the standard TestStand controls there is not much you can do. The point is that these controls are ActiveX controls which you link with the specific functionality during configuration.
If you are talking about the "Terminate All" button, there is a simple workaround:
1. Move the Terminate All button you are currently using into an area which is not displayed in the UI
2. Insert a new button in the programming language you are using as replacement (e.g. standard LV button, i recommend of type "system")
3. Insert code to react on the event that the user presses that button. In this case, retrieve the reference to the ActiveX Terminate All button and call the DoClick method
This workaround, in theory, also applies for the Terminate button as well. However, you have to make sure to terminate the correct execution which can be tricky when not relying on the ActiveX controls.
01-30-2018 07:17 PM
Thank you Norbert for your suggestion, I have created the button myself and call DoClick method of the real terminate/restart button. It works perfectly.