LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How do i get the caret position of a table control?

Hello all,

 

Currently i am using labview 2012 PDS environment. For one of my application i need to retrive the caret position of a 'table control' to validate the cell entry. Does any one know how to determine the caret position(blinking cursor position) of a table control?

 

Thank you.

0 Kudos
Message 1 of 7
(3,386 Views)

Not too sure because I don't use table very often, but maybe the "edit position" property will help you.

 

Clipboard01.png


We have two ears and one mouth so that we can listen twice as much as we speak.

Epictetus

Antoine Chalons

0 Kudos
Message 2 of 7
(3,380 Views)

Hi titou,

 

thank you for the reply.

What i exactly wanted is to discard some cells entry to the user upon clicking on the particular cell or upon pressing the tab button to move from one cell to another. i think, With this property i will be able to read the cell info but i wont be able to discard that particular event?

 

More over this edit cell functionality returns wrong index data some times. I dont know wether this is a problem or expected behaviour. i have attached the picture to make it more clear.

Not only "edit cell" property, even "selection size" property also returns wrong selection size while making row or column wise selection.

 

Thank you

0 Kudos
Message 3 of 7
(3,370 Views)

Hi,

You could try this and filter in the event structure itself.

 


CLA CTAChampionI'm attending the GLA Summit!
Subscribe to the Test Automation user group: UK Test Automation Group
0 Kudos
Message 4 of 7
(3,351 Views)

Hi,

 

The example which you have sent uses "key up event" to trace the key pressed. But i wont be able to discard this event. What i eventually need is "not to display the cell editor text box inside the table control upon pressing tab key.

 

"Key down" event has discard option but it is not producing the correct cell index value some times.

 

thank you

0 Kudos
Message 5 of 7
(3,338 Views)

I dont think this can be done automatically. You will need to use the Key Down event and check if the new value is in your restricted area. If that is the case, use the old value or direct it to the next allowable cell as per your requirement.

Use a property node write to set the next edit position.


CLA CTAChampionI'm attending the GLA Summit!
Subscribe to the Test Automation user group: UK Test Automation Group
0 Kudos
Message 6 of 7
(3,331 Views)

Hi,

 

Thank you all.

Finally i found the way to discard the cell entry of a table control when my condition is met.

 

It is achieved by removing the key focus for table control.

Discard can also be achieved by activating the escape key through dll. 

0 Kudos
Message 7 of 7
(3,324 Views)