NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

Custom Buttons using "DoClick" UI Controls API method

I  am building a TestStand Operator Interface using TestStand UI Controls.
 
It happens that for the Buttons, the captions are automatically defined by TestStand, so that I can't change what is actually written on the buttons.
 
Ok, so I created my own dialog buttons and used some event programming. When a user clicks on my button, the "DoClick" Method of the UI Controls simulate the TestStand button behaviour.
 
The problem is that I am getting great problems with that - LabVIEW crasches, I am not able to Start or Stop sequences when using "DoClick" - some few times it works, but unstable behaviour... On the other hand, TestStand buttons work ok.
 
What is the matter with the DoClick method? Does anyone had this problem before?
 
Thanks in advance for the Help! Smiley Wink
 
- Caribe -
0 Kudos
Message 1 of 4
(3,372 Views)

You can set the text on the button using the "Caption Property"

 

See help pages below. Hope this helps!

Steve

Syntax

Button.Caption

Data Type

String

Purpose

Specifies the text displayed in the control.

Remarks

In the caption, include an ampersand (&) immediately preceding the character, if any, you want to designate as an access key. The character displays as underlined. Press <Alt> and the underlined character to move the focus to the control. To include an ampersand character in a caption without creating an access key, include two consecutive ampersands. A single ampersand displays in the caption and no characters display as underlined.

When you connect this control to a manager control, the manager control sets this property automatically.

0 Kudos
Message 2 of 4
(3,364 Views)
Hello Steve,
 
TestStand sets the "Caption" Property of the buttons dynamically, because the buttons are
connected to the Manager Controls.
 
The help text you sent to me says that at the end: "When you connect this control to a manager control, the manager control sets this property automatically."
 
So, using the Caption property won't help. Maybe I have to change some property or use
some method of the manager controls fist, so that they don't change the caption of the buttons?
 
Thank you anyway and cheers!
 
Hoping for some more help, Smiley Happy
 
- Caribe -
0 Kudos
Message 3 of 4
(3,353 Views)

When you call <manager>.ConnectCommand, you get back a CommandConnection object. Set the value of CommandConnection.Options to CommandConnection_IgnoreCaption.

Then you can set the button caption without it being replaced by the manager control.

Message 4 of 4
(3,346 Views)