LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

synchronizing a listbox and a plot legend

Solved!
Go to solution

Hello all,

I'm working on some code where I would like to be able to select/deselect as many as 50 plots on an XY graph.  Because of the relatively large number of plot names, it makes sense to place them in a scrolling legend or listbox. 

Problem is (as far as I know) the plot legend can't be used to *easily* make plots disappear and appear with a single click-- one must right click, go to colors, and select transparent, etc. then reverse the procedure to make the plot reappear.

An alternative might be to use a list box 10 rows long as the master indicator, then use some of its properties to create a dynamic plot legend borrowed from a second hidden graph.  This plot legend would reconfigure its line/symbol colors dynamically based upon the where the user is within the scrolling listbox.

One problem I've encountered is that the Label.ScrollPosition property will not write out to an indicator for me.  Please see the example code.

Top row provides some feedback from the listbox, but not enough info to do the job properly.

Any thoughts?

Regards,

Ted

0 Kudos
Message 1 of 4
(2,619 Views)

Here is a screenshot of what I'd like to achieve.  Right now the plot legend will not scroll, though.

Thanks in advance for your suggestions.

Ted

 

Message 2 of 4
(2,613 Views)

Is there a property which provides the current row the cursor is on within the listbox?

0 Kudos
Message 3 of 4
(2,605 Views)
Solution
Accepted by topic author TedAnderson

Hi to know the position of the list box element...

try this...

 

<<Kudos are welcome>>

Message 4 of 4
(2,590 Views)