LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

is there a way to set up a event control in labview to create a string indicator when a button is pressed

Solved!
Go to solution

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?

0 Kudos
Message 1 of 7
(2,207 Views)

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

0 Kudos
Message 2 of 7
(2,200 Views)

Why not use a listbox, or multicolumn listbox?

0 Kudos
Message 3 of 7
(2,188 Views)

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.

0 Kudos
Message 4 of 7
(2,186 Views)

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):

 

  1. Create a text box which you hide or show (using VI server properties) and move to the correct position (again with VI server properties) based on input from your user.  You can use the event structure to signal when things are done.
  2. Create a dialog box which is nothing but a text entry box.  It will have no borders, title bar or buttons, just the text control.  Launch it and position it as needed using VI server.  This is a bit trickier to get right, since you need to ensure it stays on top.

I would recommend option 1.  It is simple and direct and does not require any multi-VI communication or coordination.

0 Kudos
Message 5 of 7
(2,182 Views)

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?

0 Kudos
Message 6 of 7
(2,157 Views)
Solution
Accepted by topic author mcfrenzy36

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 

G# - Award winning reference based OOP for LV, for free! - Qestit VIPM GitHub

Qestit Systems
Certified-LabVIEW-Developer
0 Kudos
Message 7 of 7
(2,154 Views)