NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

TSUI.IButton not displaying caption

I have a TSUI.IButton on the front panel of my (customized) TestStand HMI.  Although it's functional, the caption (what displays on the button itself) is not visible at runtime.  If I look at the property browser, I see (attached) a 'Caption' which seems to change what's on the button, and another property 'ShowText'.  If I toggle the ShowText within the property browser, the text appears/disappears as advertised.  This property, however, is not available at runtime (that I can find).  I've tried (at runtime) setting the Caption text and setting Visible to true.  However, the caption being shown at runtime is the one that appears 'above' the control, and not the one 'on' the control. 
 
I'm not sure where in the TopLevel.vi flow the caption is going away.  Obviously finding where the caption is dsiappearing in the first place is where I'd like to tackle this.  But, until I find that, I'm trying to hard-code the caption for this button.  Is there a way to get to this property at runtime?
0 Kudos
Message 1 of 3
(3,407 Views)
Hey mrbean,

Is your TSUI.IButton displaying with a "blank" caption, or, is it simply that it always uses one particular caption that you cannot seem to control?

I'll assume we're dealing with the latter case - if I'm mistaken, please correct me.

Furthermore, I'll assume that you're using one of the Managers to maintain your TSUI.IButton; if that's the case, the button caption is automatically overwritten by your Manager, as indicated in the TestStand Help.



When using the ConnectCommand method of your Manager in order to associate the TSUI.IButton with a particular TestStand Command, the "opts" input can be used to tell the Manager not to automatically write the caption on the connected control (Value: 0x2).  After this is done, you may use the Caption property of the button to programmatically set your button's caption for run-time.




...Results in...



I hope this helps!


Message Edited by DRock on 05-13-2008 10:48 AM
Derrick S.
Product Manager
NI DIAdem
National Instruments
Message 2 of 3
(3,371 Views)
That worked great !  Thank you.
0 Kudos
Message 3 of 3
(3,361 Views)