LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Shared Scrollbar within XControl

(I apologize ahead of time, I have a difficult time transferring VI's from my non-networked LabVIEW PC to a networked PC, so I am not able to import VI's, but I will try to describe them as best as I can.)

The front panel of my XControl contains (among many others) 2 controls.


HEADER Array(Cluster(Button, Title))   *** Contains Scrollbar
PRIMARY Array(Cluster(Button, Double, Double, Double, INTERNAL Array(String), Button)
(I promise there is a method to this madness.)

What I want is for the Scroll Bar within HEADER to also change the Index on INTERNAL.  Under normal circumstances, it wouldn't be difficult to trigger a "read" loop when Mouse Down and end the "read" loop when Mouse Up or Leave.  However, this is within an XControl and a loop like that is a big nono.  Not to mention, I'm pretty sure it'll just lock up.

 


Currently, I have the following event:
HEADER "Mouse Up" or "Mouse Leave":  HEADER[IndexDisplay] => INTERNAL[IndexDisplay] 

However, as you can see this will only update the IndexDisplay of INTERNAL when the mouse is released.  It does the job, but I'd like it to change whenever the index changes while you're dragging the scroll bar. 



*Is it possible to have an event of HEADER "Mouse Down" AND "Mouse Move": HEADER[IndexDisplay] => INTERNAL[IndexDisplay] ?
*Is it possible to have an event of HEADER "Index Change": HEADER[IndexDisplay] => INTERNAL[IndexDisplay]?
*What about if HEADER "Mouse Down" changed the 'state' of the XControl from "X" to "Y", wherein an event of "Mouse Move" would update INTERNAL[IndexDisplay] and an event of "Mouse Up" or "Mouse Leave" Reverted the XControl back to state "X"?



OR D) None of the Above.  Is there a way to accomplish this?

0 Kudos
Message 1 of 3
(1,878 Views)

(I am better at looking at a picture than reading long descriptions (that's why I am a LabVIEW programmer!), so please show a simple example once you can. Thanks!)

 

In any case, how about hiding all scrollbars and use a separate scrollbar from the palette to change the index of both other controls? Now add a "value changed" event on the scrollbar.

 

(see for example this for some ideas)

Message 2 of 3
(1,868 Views)

Psh, because that would be the EASY thing to do.  I was wrapping myself around the axle there.  Because then I was trying to find a way to move the scrollbar above the Array and Customize Control wasn't playing nice.

Your way is so much easier.  Thanks.  

0 Kudos
Message 3 of 3
(1,862 Views)