04-06-2009 04:02 AM
I'm trying to create a small subvi that achieves a relatively simple goal, but I'm stuck.
I need a small modal window to appear displaying a two-column table, and OK and Cancel buttons. Here are my requirements for the subvi:
I have created the subvi, as shown in the snapshot attached, which meets the above requirements. I use filter events to discard any mouse clicks in the first column, thereby preventing editing of the string values. However, it doesn't work exeactly as I'd like, and therefore I know my customer won't be pleased either: When the user clicks an entry in the second column, the string text in the first column gets highlighted. AND, this does not prepare the numeric value for editing either. As this is a LabVIEW table, to edit the value the user has to wait about a second, then reselect it - which I find a tiresome requirement. And why does the first column entry get highlighted when selecting in the second column?
Is there a way to either set up the table to accept single clicks as a request for editing entries, or
Is there a better way to present my two column list and let the user easily edit the numeric values?
I will try to create a stand-alone version of the subvi and attach it to a follow-on message if that helps people to see what I mean...
Solved! Go to Solution.
04-06-2009 08:28 AM
Thoric,
Consider two arrays. The first is an array of string indicators, set to be disabled. The second is an array of integer controls. Hide the index controls on both displays. It may take a bit of tweaking to get the vertical size on the elements of each the same so that they remain aligned. Create a vertical slide control to serve as the scroll bar. Use its output with property nodes to control which parts of the arrays are visible.
Lynn
04-06-2009 08:36 AM
I like your answer, Lynn, so I've marked it as the solution.
In the end however, I've gone for disabling my table and popping up a second (particularly small) subvi whenever a mouse click is detected in the second column. This second subvi simply allows the user to enter a new value, which is returned to the calling subvi and used to replace the existing numeric. It works, but it's a little less cuddly than what I had in mind.
Thanks for you advice! 🙂
04-06-2009 08:53 AM
Thoric,
Many ways to solve a problem. The pop-up subVI is often a good choice. In your case it emphasizes to the user that only the numeric element is available to be changed.
Lynn