NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

Resizing the Response Text Box in a Popup Message

Solved!
Go to solution

The sequence I am editing contains a popup message with a response text box.  At this point, the response text box is about 3" long, but the operator only inputs 1 digit.  I've been asked to shorten the length of that text box, but it seems to me that the box automatically sets the length to fill up the width of the popup message window.  I've looked through all the message box properties, but I don't see a way to decrease the length of that text box.  Is there a way?  Thanks.

Forbes Black
Lapsed CLAD, LV 5 - LV 2022 (Yeah, I'm that old...)
0 Kudos
Message 1 of 4
(4,409 Views)
Solution
Accepted by topic author diarmaede

You have the source code for the message box.  You'd have to edit that and rebuild it.  It is located in <TestStand>\Components\StepTypes\MsgBox folder.  Looks like it is written CVI.

 

The other option is to create your own dialog using the language of your choice.  You have more control this way and it won't impact all of TestStand.

 

Hope this helps,

jigg
CTA, CLA
testeract.com
~Will work for kudos and/or BBQ~
Message 2 of 4
(4,350 Views)

Hi diarmaede,

 

Unfortunately, the only configurable properties of the text box that are readily available to the user are as follows:

Step.ShowResponse—Enables the response text box control in the message popup dialog box.
Step.NumberLines—The number of visible text lines in the response text box.
Step.MaxResponseLength—The maximum number of characters the user can enter in the response text box control.
Step.RespFontData—The font for the response text box control in the message popup dialog box.
Step.DefaultResponseExpr—The initial text string the step displays in the response text box control.

 

Reference:

Message Popup Step

https://www.ni.com/docs/en-US/bundle/teststand-api-reference/page/tsref/message-popup-step.html

 

You are right that the message popup text box resizes to fill up the width of the popup message window, but the source code that defines the default message popup step in TestStand does not have an accessible property for the length of the message box.

 

The Message Popup step's CVI source code is actually shipped with TestStand and should be located on disk at <TestStand>\Components\StepTypes\MsgBox. You could technically alter this source code to affect the message popup steps, but it may be a little more laborious than it is worth.

 

Another option would be to create a custom popup dialog yourself (e.g. by using C# or LabVIEW) and use that instead of the Message Popup step.

 

Jorr-El
Systems Engineer
Testeract: Automated Test Specialists
Message 3 of 4
(4,345 Views)

Looks like jiggawax beat me to it 😉

Jorr-El
Systems Engineer
Testeract: Automated Test Specialists
0 Kudos
Message 4 of 4
(4,343 Views)