LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Scrollposition of a table in XControls

Hi
I'm creating a XControl where I'm combining an array of clusters (A) with a Table in a cluster. The cluster (A) consists of several bools. When I scroll the table, the array must scroll synchronously. Is there  a way to detect the change of the IndexVal property of the table within the XControl and how can I combine this value change with an event?
The easiest way would be a mouse scroll event, but this is unfortunately not supported:-(

LabVIEW 8.0.1 on SuSE Linux 9.3

Thanks for your help

Ueli
0 Kudos
Message 1 of 7
(3,006 Views)
Hi Ueli,
 
to scroll the array sym. to the table, you can use the propertys like you proposed.
I attached an example, which shows the functions in a simple way.
 
Events are mostly used to check User Interface Events, like changing a value of a control by adding a value to the table. The indicator, which shows the Property Values is changed programmatically and will not cause an Event.
 
The Example shows a way to get a Boolean Value depending on a Position Change.
Feel free to ask, if there are further questions.
 
Regards,
 
Stefan Henke
NIG
0 Kudos
Message 2 of 7
(2,989 Views)
Hi Stefan

thanks for your Help. I already thought about a similar solution. The problem with this approach is, that the XControl-whileloop is not even runned through when the mouse wheel is turned over the table (table is part of a cluster). It works fine when I navigate the table with the up/down arrows.

Ueli


0 Kudos
Message 3 of 7
(2,980 Views)
Is it possible to restructure your data so you only have one array of clusters?  So each cluster element has a boolean and a 1D string array?  That would keep it together for scrolling.  I don't know what your XControl needs to look like - maybe you can post a picture of it?
0 Kudos
Message 4 of 7
(2,972 Views)
Hi
That is an other approach I already thought about. It doesn't work either. The reason is, I have to be able to disable or mark lines or parts of lines. In an array of clusters you can disable a single cluster element, but then this cluster element is disabled in every index (you allway refer to the same reference in an array of cluster).

To my XControl:
Data is given as a 2D Array of string. The 1st three columns are bools (buttons  on the picture). There are different states which indicates that a special line must be disabled, or somehow marked. So you can see, when scrolling, the boolean states have to scroll as well.

Hope this picture gives you an idea of the problem.

The approach I have choosen now is, that I have got two events. The 1st event tech. described by Stefans's post, the 2nd one is fired whe I move the mouse over the table and the IndexVal has changed bevor.  With a given 'Mouse Scroll Event' for LV-Events it would be much easier.

Regards
Ueli
0 Kudos
Message 5 of 7
(2,965 Views)
Can you try putting your own scrollbar control (from the System Controls palette) on the Front Panel, and hiding the scrollbar of the array, and making use of the Value-change event of your scrollbar?  From a quick test I did it seemed to fire even during dragging of the scrollbar.  You would then scroll the arrays manually.
0 Kudos
Message 6 of 7
(2,950 Views)
Aha, good idea! I've not yet seen this new Control in LV 8. This would be a solution with the loss of the posibility of scrolling with the mouse wheel. Realy a pity, but perhaps the most desent solution.

Thanks
Ueli
0 Kudos
Message 7 of 7
(2,940 Views)