LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

table control tabbing and size

Solved!
Go to solution

Hello Everybody,

 

I am using table control for the first time and am having problems in the following areas:

1. When I start inserting values into the cells, I could go on and inserting values with seemining unlimited number of rows. Is there a way to limit the number of available rows in the table to a specific number? I tried to use the NumRow property and apparently it is only useful to indicate the number of rows to display within the table control.

2. When I hit the tab key, the focus jump from one cell to another, which is good, except it does not jump to the last column. It jumps from cell 4 to 5, 5 to 6 each time I hit the tab key. But when it is at cell 6 and I hit the tab key, it jumps to cell 8 rather than to cell 7, which is what I would expect it to do. Is there a way to correct this? See picture below.

 

Thanks for your help.

 

Yours,

hlim

 

table.jpg

0 Kudos
Message 1 of 5
(4,245 Views)

Please do not show us a picture of the control that does not work the way you'd like it to work -- attach actual LabVIEW code, perhaps consisting only of your Control (but maybe some code that uses the control) and we'll take a look.

 

Bob Schor

0 Kudos
Message 2 of 5
(4,203 Views)

Hello Bob Schor,

 

Good advice. Here is the code (the vi and a text file). I am using Labview 2014 (32 bit). This program reads the content of a text file into the table. It allows the user to change the value in the table cells or add new info into the empty cell. The user click 'ok' to save the content to the save text file.

I have place the text file to be read by the vi in a specific path. But you can change the vi to read the text file from anywhere you want.

The open issues are:

1. The tabbing from one cell to another. I cannot tab to the last column. It springs to the first column of the next row.

2. How can I limit the number of rows of the table to 30? Currently I am able to enter data into as many rows as I want just be using the vertical scroll and going to the next row to enter data.

 

Thanks for your help.

hlim

Download All
0 Kudos
Message 3 of 5
(4,185 Views)
Solution
Accepted by topic author hlim

Hi,

 

have a look at this small example. Hope this helps.

 

Best Regards,

Fabian

Message 4 of 5
(4,169 Views)
Solution
Accepted by topic author hlim

Hello Fabian,

thanks for the example. I now understand your technique to limit the table control size to a certain row. Using your recommended implementation, I set a mouse key event to force the IndexVal to a specific position whenever user try to scroll past the allowable number of rows. Thank your very much for your help.

 

Also by setting the NumRow and NumColumn Property specifically (i.e. to 3 and 4), the tabbing problem went away by itself.

 

Yours,

hlim

 

 

 

 

0 Kudos
Message 5 of 5
(4,137 Views)