10-14-2015 01:37 PM
Interesting labview custom control problem- Wonder if anyone has experienced it or I might have been a plonker!
I have a cluster of elements and one of those elements is array-lets call is Array1-. Elements of Array1 are added programatically and vertical scroll bar is visible so all elements of Array1 within cluster could be observed by dragging the vertical bar.
Above cluster is itself within an array of size 10. Lets call it Array2.
When elements are added in Array1 and its scroll bar is dragged down. And if then mouse is hovered over second element of Array2. the scroll bar for the second element moves down automatically. Could this behaviour be easily disabled.
Many thanks
K Waris
10-14-2015 02:03 PM
It's hard to tell what you're talking about... How can you scroll Array1 if your mouse is hovering over Array2?
Cheers
--------, Unofficial Forum Rules and Guidelines ,--------
'--- >The shortest distance between two nodes is a straight wire> ---'
10-14-2015 02:29 PM
No.
Elements of an array can differ only in value and not atributes. The scroll postion is an attribute.
There is an odd behaviour if you watch closely that the "OTHER" may not refresh unless you pass your mouse over it.
Ben
10-14-2015 02:31 PM
Sorry it was not very clear. Please find attached .ctl file.
Just open it and drag the scroll bar of Array1 in any element of Array2. Then hover over
other elements of Array2!
Cheers
K Waris
10-14-2015 02:50 PM - edited 10-14-2015 02:57 PM
Ah, now I understand. That scroll position is an Attribute just like Ben said, so the value will change for all elements of the array to match.
You could do something fancy with mouse events to make the scroll position change back to where you want it or something I guess, but that's the only option.
My initial idea:
Cheers
--------, Unofficial Forum Rules and Guidelines ,--------
'--- >The shortest distance between two nodes is a straight wire> ---'
10-14-2015 03:08 PM
I'm familiar with the issue you are describing, but I've never really had an problem with it, because complicated data structures usually aren't presented to the user in this way, in applications I write.
In this case you have an array of clusters, and in the cluster is a 1D array of numbers. So I might see that as a table, having N 1D arrays is the same as having a 2D array. If data isn't setup that way, maybe a tree control can show nested structures well, and the user selectes one child item in a tree, which populates one 1D array, or one single column listbox at a time. Here the array of clusters can still be the data type used in the program, but it doesn't have to dictate the type of controls the user has. My point is I try to avoid complicated data structures that the user fills out because it can be confusing, even to the person who write it some times.
That being said if you want to stick with this type of structure you could some time showing the UI in other ways. Like instead of an array can you get away with N scalar clusters? Then get and set their values using their references in a for loop so you don't have to deal with all those wires.
Unofficial Forum Rules and Guidelines
Get going with G! - LabVIEW Wiki.
17 Part Blog on Automotive CAN bus. - Hooovahh - LabVIEW Overlord