LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Prevent scrolling in fixed size table

I am trying to create a table of fixed size on my front panel. So say I create a table of 5 rows and 6 columns. Column and row headers, titled A to F and 1 to 6 respectively, will be visible. The index value controls will be hidden so that view of the table can't be changed by the user. I don't want any row or column scrolling regardless of what cell is being edited.

My problem is that editing any cells with column index 5 can cause the column index to be increase by two. So if I left click in the cell F1 (Row=0,Col=5) then hit the enter key the whole table view shifts by two columns.

I have attached an example to demonstrate. There are two tables on the front panel. Table 1 is a normal table that I haven't done any thing apart from turn the headers and setup the size. Table 2 is a copy of Table 1. The width of the first column was then increased. Watch out for the Table 2 footprint size changing after Table 2 has scrolled. Running the VI again seems to reset the table footprint size back.

Table 1 doesn't have the issue.

Table 2 does have the issue.

Table 1 has a neat feature when press return key at the bottom of the row the edit cell hops up to the top row of the next column. This stops any vertical scrolling. That’s the kind of thing I want.

I have been studying this to try and work out the mechanism to prevent it. Not been successful so far but it seems to be related to the change in the first column width.

Sometimes you can get too close to a problem so I would appreciate a fresh perspective. Can any body help me achieve a fixed table size without scrolling?

Thanks in advance

David

Labview 8.0

0 Kudos
Message 1 of 8
(5,528 Views)

Hi,

I ran your VI with Labview 7.1 and both table show the same right behaviour...

CLD - Labview Certified Developer
0 Kudos
Message 2 of 8
(5,516 Views)
thanks
 
When I open the 7.1 version under LV7.1 and click the A1 with the mouse then press the return key I get vertical scrolling when it reaches the bottom row on both tables.
 
It seems to behave differently under LV8.0.
0 Kudos
Message 3 of 8
(5,509 Views)

Hi,

I solved it in this way...I don't know if there is a easiest one.

Regards

CLD - Labview Certified Developer
Message 4 of 8
(5,496 Views)

Many thanks I appreciate you looking into it. Please have some stars Smiley Very Happy

However I realise I could "fix" the table in place using code like yours. I suppose I am unhappy about the way the default behavour of the Table 2 changed just by changing the first column width. In the labview 8 version the Table 1 would go from A1 to F5 then return A1 when hitting the [Return] key. Great! However Table 2 goes from A1 to H5 then returns to C1 because the index view was update to Row=0 and Col=2 when I hit enter on F1. I don't know why the edit position decides to enter the G and H columns.

To me it looks like a little bugette. Not a show stopper but annoying as I can't understand why.

thanks again

David

0 Kudos
Message 5 of 8
(5,488 Views)
Sure does seem like funny behaviour. I've reported it to the relevant contacts for further investigation. Your best bet is to look at some of the mentioned workarounds as any fix would likely be implemented in a future release.

Hope this hasn't caused you too much inconvenience! I'll post back any info that i can find but this is unlikely to be in the short term.
Message 6 of 8
(5,465 Views)

S R

Definitely appreciate the feedback!

I have been caught up in other things at the moment so I haven't actually had time to appreciate the consequences of the behaviour since I posted. You and the other posters are absolutely right that there are ways to skip around the problem.

thanks

David

0 Kudos
Message 7 of 8
(5,459 Views)

Have any further ideas come to light with later versions of LabView with this problem?

The table properties related to "table size" vs "displayed rows/columns" I have always found clunky.

 

Adam

0 Kudos
Message 8 of 8
(5,234 Views)