Dan Bookwalter N8DCJ Posted July 2, 2015 Report Share Posted July 2, 2015 Ok I must be overlooking/overthinking this , but , I have an array with a cluster that has a String control and a Combo box that needs to get populated .... I cant seem to get the combo box to populate properly... how does one go about setting the string values of the combo box in each cluster/array element , every element gets populated with different data. Thanks Dan Quote Link to comment
hooovahh Posted July 2, 2015 Report Share Posted July 2, 2015 You can't do it the way you want. An array by definition means that every element in the array has the same properties, and only varies by value. This means each combo box needs to have the same drop down items. Now there are work arounds, like replacing the current items in a drop down with new ones as the user uses the control. So if I click on the second element I can change those items when it is clicked. I may have an example somewhere. It basically involves capturing the mouse down? event on the combo box then using that reference to set the items. 1 Quote Link to comment
Dan Bookwalter N8DCJ Posted July 2, 2015 Author Report Share Posted July 2, 2015 Hooov I was kind of worried about that .... I have already started down the road of populating as the user clicks on the control... I wish there was a more elegant way of doing this , but , I can deal with it this way .... Or if a Multi Column list box would allow you to highlight different cells in columns I could work with that too... My limited messing with the multi column list box it didn't appear I can do that either... Thanks Dan Quote Link to comment
hooovahh Posted July 2, 2015 Report Share Posted July 2, 2015 Or if a Multi Column list box would allow you to highlight different cells in columns I could work with that too... My limited messing with the multi column list box it didn't appear I can do that either... You can do this too. Capture Mouse Down? then use the coordinates and the invoke node to get the row and column clicked, then set the background color the the blueish color. LabVIEW can make software with any UI capabilities of any other programming language. It just might take some work arounds. 1 Quote Link to comment
Tim_S Posted July 2, 2015 Report Share Posted July 2, 2015 Another option is to convert the array of cluster of... to a cluster of cluster of... This would let you set the values for each control independently. If you need to scroll through, a placing a scroll bar the value of which is used as the top index in your array of elements to populate the cluster of clusters with. This is quite code-intensive, but works well. I had another thought about using the Mouse Down? event, determining if the drop down of a combo box was clicked, changing that to a right click, and generating the appropriate menu... then realized that wouldn't work for typing in a value. Quote Link to comment
Dan Bookwalter N8DCJ Posted July 2, 2015 Author Report Share Posted July 2, 2015 You can do this too. Capture Mouse Down? then use the coordinates and the invoke node to get the row and column clicked, then set the background color the the blueish color. LabVIEW can make software with any UI capabilities of any other programming language. It just might take some work arounds. Hooov Thank you sir .... done.... Dan Quote Link to comment
drjdpowell Posted July 2, 2015 Report Share Posted July 2, 2015 A related LAVA conversation, including multiple examples of different techniques one can use. I did a “cluster of cluster†example. Quote Link to comment
ensegre Posted July 2, 2015 Report Share Posted July 2, 2015 drjd preceded me, I wanted to point at that too. Despite my asking there, at the end of the story for that case I'm using a generous number of copies of my cluster, like suggested, playing with visibility and position to show only those I need; accessing individual "elements" and manipulating their cosmetics via an array of their references, and opportune property-by-reference accessors. Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.