04-26-2010 05:50 PM
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!
Solved! Go to Solution.
04-26-2010 06:04 PM
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.
04-26-2010 06:14 PM
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.
04-26-2010 06:25 PM
04-26-2010 06:36 PM
04-26-2010 06:58 PM
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.
04-26-2010 07:11 PM
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!
04-26-2010 11:22 PM
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 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!
04-27-2010 12:10 AM
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.
04-27-2010 01:57 AM
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.