03-29-2012 09:53 AM
I am trying to set up a UI where an operator can set up column headers for a report and I am using string indicators as the placement for the text in the column headers. Since many of them will not have experience with Labview, I was hoping to set a button with event capability to add or possible remove a string indicator when pressed. Is there a way to put together an event like this?
Solved! Go to Solution.
03-29-2012 11:55 AM
It is not completely clear to me what you are trying to do.
You cannot easily create controls or indicators at run time because you would not have any code to use them.
However, you can use property nodes to make visible or invisible controls which you previously created. This is probably what you should be doing. Use a value changed event on your button. In the event case write to a property node for the string indicator to make it visible.
Lynn
03-29-2012 12:44 PM
Why not use a listbox, or multicolumn listbox?
03-29-2012 12:48 PM
If you want a VI that modifies another VI, that can be done with scripting.
If you want a VI to modifiy itself, there are ways to do that, but it's very ugly.
03-29-2012 12:54 PM
It sounds like what you really want to do is have an appearing/disappearing text box for the user to enter data when necessary. There are two easy ways to do this (the easiest of which has already been mentioned):
I would recommend option 1. It is simple and direct and does not require any multi-VI communication or coordination.
03-30-2012 08:41 AM
I used the option to first create the controls, then make them visible/non visilble depending on the button pressed. The issue that I have now is that the controls lose their data once closed. Which option would be good for a user to enter data and it be stored and available again when focus comes/goes from the VI?
03-30-2012 08:59 AM
You cant create a string indicator, but you can change visibility of existing ones.
Thus you can show a string indicator, giving the impression it's created. 🙂
/Y