04-26-2006 07:19 AM
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
04-26-2006 07:53 AM
Hi,
I ran your VI with Labview 7.1 and both table show the same right behaviour...
04-26-2006 08:06 AM
04-26-2006 10:15 AM
Hi,
I solved it in this way...I don't know if there is a easiest one.
Regards
04-26-2006 10:55 AM
Many thanks I appreciate you looking into it. Please have some stars ![]()
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
05-02-2006 07:56 AM
05-02-2006 08:11 AM
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
06-27-2007 12:17 AM
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