LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

XControl Editable Default Value of State

Hello, I frequently use Help buttons which show One button dialog with some help info, the problem is that I have to add a case in Event structure for every such button. I would like to make it more customized. My idea is to rightclick the button in Edit time, set the value of help string somewhere, which would make it the default value, and next time, even in builds, when I press this exact help button, it shows the correct string in One button dialog. (Currently it is only settable by right-clicking in Run-time as I can't find a way to create an Edit-time Menu.)

 

But how to save the state? I want to avoid saving to text file due to obvious problems, I would really like to set the default value of the control state "inside" the control instance. But I can't figure out what and where. Is it even possible?

0 Kudos
Message 1 of 3
(1,318 Views)

Hello,

 

Based on your message, I understood like you need to store the help message to the button itself during the development phase. So for this, you could store the Help Message in the Control's Description field. Then in the code you can implement to use this description as your Help Message. Since your XControl's data type is numeric, the message can be passed using a new property to this XControl.

I have created a simple "Help Description" property to your XControl. And in the Test.vi, I have added the code to read the control's description and update the "Help Description" property. Hope this is helpful for you.

 

If this doesn't meet your use case, please elaborate your requirement.

 

Thanks,

Mano Prabha

0 Kudos
Message 2 of 3
(1,288 Views)

Here's what I use.  Maybe you can modify it for your purposes.

I built in with LV2018 using NXG style controls.  When I backsaved it to LV2017, the controls turned out ugly.  Have fun with the plastic surgery/

"If you weren't supposed to push it, it wouldn't be a button."
Download All
0 Kudos
Message 3 of 3
(1,266 Views)