LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Swap the key focus at Array element

Hello,
          Would you help me about the title query ? the details is in attachment. thanks @! LV7.1 version.
0 Kudos
Message 1 of 5
(4,243 Views)

Attached is a quick example showing the basic method needed for a table.

An array is more complex, because to refer to a specific array element, you first have to resize the number of visible elements to 1, then use the Array Element>Reference and cast that reference to a cluster, and set the key focus to the right element of the cluster and then resize the array back to its display size. To avoid having the user see this, you need to use the Defer Panel Updates property, and this might cause the control to lose the focus, I'm not sure.

A side note is that using Value property nodes is not a good way of doing things. A local is usually better and using real data flow is even better.


___________________
Try to take over the world!
Message 2 of 5
(4,216 Views)

tst, thanks, Yup, that is what I want. and the edit position that I used, but I don't know why I can't rearch that goal.

BTW

you wrote "A side note is that using Value property nodes is not a good way of doing things. A local is usually better and using real data flow is even better."

I don't know why using value property nodes is not a good way than using real data and a local....? at my experience that I like this handle usually, would you help to tell some ? thanks!

0 Kudos
Message 3 of 5
(4,206 Views)
The Value property was designed to let you put complex/common UI procedures in a subVI by passing the subVI a reference to the object.  If used in the VI that contains the object, the local is an order of magnitude or more faster.  The major reason for this is that each call of the Value property updates the front panel, while each call of the local does not (it goes through the usual LabVIEW display algorithm, which updates the display when there is time and processor resources).  Using the actual variable itself is usually even a bit faster.  You can check this by setting up a FOR loop which updates an integer on the front panel 10,000 times.  If you use the Value property, the execution time will be much longer than if you use a local or the actual variable.
Message 4 of 5
(4,192 Views)
Oh, I see now, thanks @!
0 Kudos
Message 5 of 5
(4,180 Views)