LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Multicolumn List Configuration File

Solved!
Go to solution

I'm trying to make use of the multicolumn listbox to create a user friendly, easy to use front panel interface for setting up a configuration file. I would like to have 2 listboxes: (1) contains a master list of hardware devices available to the user and (2) the order of the configuration file (only contains the hardware devices the user needs).

 

Ideally, I'd like to be able to lock the name / values of the master list so that the user cannot change the information. I've tried making the listbox a typedef / strict typedef, but the items can still be altered. Normally, I would just provide an ENUM control which only contained the items available, but I'm new to listboxes and not sure if this is possible or not.

 

Thanks for the help!

0 Kudos
Message 1 of 12
(3,743 Views)

1. Right-click your listbox(es) and select Create --> Property Node --> Disabled.

 

2. Right-click property node select Write all. 

 

3. Right-click the property node terminal select Create constant.

 

4. Use the Disabled value on the enum constant.

0 Kudos
Message 2 of 12
(3,734 Views)
Solution
Accepted by Newbie217

I use multi-column listbox a lot.  A really nice thing you can do with them and what I do now with all my listboxes is implement the TS.Popup VIs.

 

http://lavag.org/index.php?app=downloads&showfile=31 

 

With this toolkit you can apply drop-down menus to your listbox entries (only the cells of the listbox which are registered).  The cells can be dynamically registered/unregistered at run-time.

 

Any questions let me know.

0 Kudos
Message 3 of 12
(3,729 Views)
thanks for the help. Also, is there a way to individually isolate which columns get disabled? The Property Node -> Disabled seems to only disable the entire row, but I just want to disable certain columns?
0 Kudos
Message 4 of 12
(3,724 Views)
thanks for the link! The ts popup toolkit looks to be a very powerful, elegant solution for using listboxes.
0 Kudos
Message 5 of 12
(3,716 Views)

Disable the whole listbox then use the TS Popup to modify certain (registered) rows.

 

I register only the row that is active by enabling the select single row property (it enables the highlighting of an entire row).  Depends on your application.

 

TS Popup takes time to get to know how to use, but there are good examples included.  Once you know how to use it you will, as I do, always use it.

 

There is a trick to getting it (TS Popup functionality) to work as an exe; the solution is in this forum.  You need to change the reference in Functional Global to strict-typed.

0 Kudos
Message 6 of 12
(3,708 Views)

Newbie217 wrote:
thanks for the help. Also, is there a way to individually isolate which columns get disabled? The Property Node -> Disabled seems to only disable the entire row, but I just want to disable certain columns?

See this thread for possible work-around involving dynamic events.

 

http://forums.ni.com/ni/board/message?board.id=170&message.id=178664&query.id=2947146#M178664 

 

TS Popup would be easier, I'd suggest.  Or even easier, change your columns to rows!

 

 

0 Kudos
Message 7 of 12
(3,701 Views)

So I tried using the TS popup vi's in my own program to incorporate the features I wanted. I've tried following the demo code exactly, but for some reason I am getting an error in the registered popup event during the variant to datatype conversion Smiley Mad The datatype is a typedef control that I have not altered. Can someone help explain what I need to do to get the program working correctly?

 

I do notice that if I use breakpoints to step through the program, the dynamic event does not execute but I can see the popup options displayed correctly on my front panel.When running dynamically, I always get the error at the user event and the front panel never updates to show me the popup options.

 

Thanks!

Download All
0 Kudos
Message 8 of 12
(3,683 Views)

Like I said, the TS Popup VIs are not so easy to understand or get working.  It may take longer than a couple of hours.  It took me a week or so to have it doing what I wanted.  I have modified the type def to include custom popup types.

 

Not many people on this forum have or are interested in using TS Popup; that is what I found.  It will be hard for people to help you also because they need all of the many TS Popup VIs.  Make a project and build an llb which you can post.

 

You probably need to take the time yourself to make it work.  I have it working, so Im sure you can too.  The only drama I had was building an exe, and I have told you the answer to that.

 

Like I said before though, if you want a quick solution - turn your columns into rows and use the standard Disable Rows Property Node.

0 Kudos
Message 9 of 12
(3,676 Views)

battler, thanks for the help! I'll keep working on it and hopefully figure it out. Not really sure why it isn't working at the moment. I even tried copying and reusing the original demo in my program, but even that doesn't work. When the dynamic event 'popup event' runs, the call data never gets populated in my program (blank variant). Maybe there's a lot of behind the scenes stuff I'm missing, but my wires appear to be all connected correctly.

 

Included is the library and my program is the top-level file.

0 Kudos
Message 10 of 12
(3,661 Views)