NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

Teststand popup accepts Spacebar

I am using Teststand 4.0 on one machine and 4.0.1 on another and seeing the same problem.  I have created a popup message which contains a question and two buttons "Yes" and "No".  I have set my default button but when the popup comes up it accepts the <ENTER> key and the <Spacebar> key.  Is there a way to make it so the spacebar key is not acknowledged as a selection of the default button? 
0 Kudos
Message 1 of 4
(3,473 Views)

Hi,

You will have to modify the MsgBox step type code so that in the callback for the Active / Default button, if the key is the Spacebar then the event is swallowed.

You will find the code for the MsgBox steptype in \components\NI\StepTypes\Msgbox\.

Copy the folder to the corresponding \USER\ folder before you make any changes and make the changes to the \USER\ version.

Regards

RAy Farmer

Regards
Ray Farmer
0 Kudos
Message 2 of 4
(3,452 Views)

Could you expand on how to update this code, and whether its within teststand, or directly in the c code?  Our test group is also experiencing issues dealing with this.

 

Thanks,

April

0 Kudos
Message 3 of 4
(3,089 Views)

Just want to add that the spacebar selecting the active (i.e. focused) button is a normal behavior of UIs on the Windows Operating System. It is there to support keyboard navigation. If you disable it users will no longer be able to select a button using Tab to change the focus and spacebar to press the button.

 

-Doug

0 Kudos
Message 4 of 4
(3,047 Views)