02-15-2011 08:05 AM
I have a two-dimensional array on my front panel (pictured below). While my VI runs, the array populates with data as it comes in. One row is populated at a time, starting at the top row and moving down. The longer the VI runs the more rows get populated.
Sometimes I scroll down and/or to the right with the scroll bars to see additional data. Then when I stop/start the VI, the scroll bar positions stay at the last left value (as shown above). Then as data comes in (starting with the top row) I can't see the first few rows of data since the array is scrolled so far down.
I want to program my VI to reset the scroll bar positions to view the top left (first row, first column) every time the VI starts running. But I can't figure out how. I don't see an array property that allows you to set the scroll bar position directly. I've tried making the scrollbars invisible and then visible again to reset them. I've also tried making the array window display size 1x1 or 100x100 and then returning it to the previous value. But everything I try results in the scroll bars being in the same position they were at the start.
Can somebody help me?
Solved! Go to Solution.
02-15-2011 08:09 AM
02-15-2011 08:09 AM
BenG.
To programmatically position the scroll bar you have to use the "IndexVals" property node of the array. For a two-dimensional array you have to wire an array with a length of 2 into the Index Values property. For example, an array = {2, 3} would position the scroll bars so the second row and thrid column was the top left visible cell.
Hope this helps,
Rob
02-15-2011 09:29 AM
Thanks! This is exactly what I was looking for.
Sorry for posting in the wrong place.