Ni.com is currently experiencing issues that may cause some pages to fail.
Support teams are actively working on the resolution.
Ni.com is currently experiencing issues that may cause some pages to fail.
Support teams are actively working on the resolution.
08-19-2010 01:24 PM
I have implemented an event structure to enter data into a multicolumn listbox. I wanted to use a table, however it was difficult to place symbols in the first column; even using odd fonts (Webdings, etc.) to obtain checkmarks, X's, etc.. I also don't want the user to edit some columns, so a MCL with an event structure to detect user input is working well in test code.
When the user clicks a cell in the MCL then I place a transparent string control over the cell of the same size, so to the user it appears that they are entering data. I pre-fill the string control with the existing contents of the cell and place the selection at the end of the string. After entering a string the transparent string control is moved outside the MCL so all mouse clicks in the MCL are still detected. This all works fine.
If the user changes the value and presses "Enter" or clicks the Enter text checkbox button under the File menu, then the event structure "Value Change" triggers.
If the user keeps the same value and presses "Enter" then the event structure "Key Up" where ScanCode = 28 detects the "Enter" press.
However, if the user wants to keep the same value and presses the checkbox button under the File menu then the event structure does not detect this. I added a Tip strip to the string control but if the user moves the mouse away from the control then the tip appears only briefly.
Some of my users are used to clicking the checkbox button to enter strings, so I'd like to figure out how to handle this event.
What case can I add to the event structure to detect the user keeping the same value by clicking the checkbox button?
Thanks for any advice.
Leif Kirschenbaum
P.S. I am using LV 7.1 because my startup employer can't justify the money to upgrade right now. Yes, in more modern versions there are property nodes to report row & column clicked in a MCL, however I don't have access to that, so I use the MCL Top/Left position and row/column sizes to determine which cell they clicked in.
Solved! Go to Solution.
08-20-2010 05:44 PM
Would an even case for Value Change of the check box work with a nested Case Structure for the condition on whether it was True or False work?
Just a quick suggestion since there seems to be much more going on in the system.
Logan H
08-20-2010 08:38 PM
I think you are suggesting I create an event case for the checkbox.
I don't know how to create an event case for the checkbox (aka Enter button) since it is a LabVIEW menu built-in button -- the one that appears to the left of the run button and below the file menu when you enter a new value in a control -- not a checkbox which is a front-panel control.
This is the Enter button I am referring to (from the LabVIEW help):
Enter appears to remind you that a new value is available to replace an old value. The Enter button disappears when you click it, press the <Enter> key, or click the front panel or block diagram workspace.
Regards,
Leif Kirschenbaum
08-21-2010 02:33 AM
You could hide the toolbar of the VI while running, this will disable the option to click the 'enter' button.
Or you could run a small loop to see if the string still has key-focus, I found out that when you 'enter' the key focus is removed from the string control.
Ton
08-21-2010 02:48 AM
I'm not sure about 7.1 but in LabVIEW 2009, you have the option for an 'editable' MCL, editing is quite tricky, you have to slowly click once in the cell you want to edit, then a hidden string pops up, just like your code. Then you can use the 'Edit Cell' and 'Edit Cell?' events.
Ton