08-17-2015 01:23 PM
So it looks like both of the options shown from James.Morris and Hooovahh would work and are nearly the same thing.
James - I did code up exactly what you had shown, and I can see how I could make it work.
Hooovahh - I saw your other example during my search but it was a bit dated and I was hoping there was now a simple solution to this.
Thanks to both of you for your input and code examples.
Essentially I gather that I need to extract the commands available from all my class object units, place them into a string array to be used on a combo box within the cluster within the array.
Then I need to trigger by mouse-down, or possibly a "unit-selector", then index out the commands string array based on the Name identfifer for that array element (unit), then populate the combo box strings at that time for that array element.
Pheww! A bit of code for something that seems so trivial and an obvious need. Someone must have a package or add-on to simplify this??
For me, for now - I have resorted to a multi-column listbox and just dumped all the stations and commands in there, dbl click to send the command you need.
Again - thanks for the input and feedback.
Dave
08-17-2015 02:15 PM
@James.M wrote:
Aaaaand of course Hooovahh made the same thing already, better and a year ago.
Thanks for this, I added it to my set of links of common questions for future use. That being said you have been ahead on the leaderboard for some time now. So you're doing something right.
Yeah there isn't a very modular solution to this. I have some internal functions that wrap some of the usefulness into a VI to handle the Mouse Down? or Key Down? and a few globals to contain the list of options, given a selection, but still it isn't very satisfying.
I hate XControls for actual UI stuff (debug and probes are great) but this could be a good use for an XControl. Of course the problem with XControls is that you'll invest a ton of time making it useful, modularizing it and thinking of all the uses. Then the first time you use it you find an edge case that doesn't work, or the user wants to color the control with VI Server like normal controls and you need to bolt that on.
In the end I think wrapping this into a few subVIs to help is about the best you can do for now. But if you do make a neat XControl that does everything please post it.
Using Tables with drop downs over top is a good technique too. Click on a cell and a combo box is moved into the cell and dropped down with the options that are possible. Picking an option then puts that string into the cell and hides the combo box. There are neat demos of this. I started with this one, but then added a few features that make it work a little better with UI resize, and dismissing the drop down.
Unofficial Forum Rules and Guidelines
Get going with G! - LabVIEW Wiki.
17 Part Blog on Automotive CAN bus. - Hooovahh - LabVIEW Overlord