LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

simple table & access



Hi,

  Attached is a simple vi with a table of default values. I would like to be able to click on a cell in the table & have the Numeric be inserted into that cell, & have that cell be filled in blue.
I would like to be able to clear any Numerics that have been added as well as return all the cells to their original white colors.
Finally, I would like to be able to scroll the table to see all the rows available.

Sounds simple - I can't get any of this to work right !
Any help would be appreciated.

Regards,
ak


0 Kudos
Message 1 of 5
(2,570 Views)

Problem solved !  I needed to define the array with the 3rd column active.

To scroll, I needed to programmatically enable / disable the table control because I couldn't find an event handler for "mouse has entered the space of a scroll bar".

ak

0 Kudos
Message 2 of 5
(2,566 Views)
Hi cig438,
 
Can you please suggest how to attach VI file or any other file to our question / answer.
 
reply awaited.
thanks
0 Kudos
Message 3 of 5
(2,557 Views)
A couple pointers:
 
1. You don't need a timeout for your event structure. Having one set with a 5 ms timeout makes your program do more work than it needs to.
2. Make events for I wanna scroll and stop. This way you can get rid of the timeout as I said in 1.
3. You don't need the flat sequence structure in the mouse down event. You can simply add CellBGColor to the ActiveCell property node.
4. The numeric control should be inside the event case. The way it is now, it will be read before waiting for an event so if you change it, then click on the table, the old value will be used. But since you only have a 5 ms timeout you'll never see this happen.
5. Some of your wiring is confusing because the wires do not go directly into the tunnels. Cleaning up the wiring will make your VI easier to understand and work with.
0 Kudos
Message 4 of 5
(2,557 Views)
Also, you can speed up the clear event by wiring -2,-2 to active cell and setting the color to white. You don't have to use any loops. Here, I had some time so I cleaned up your VI for you. Let me know if you have any problems with it.
Message 5 of 5
(2,551 Views)