LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Start position on plot legend scrollbar

If I right click on the plot legend I can show the index display and vertical scrollbar. When I move the scrollbar the index changes accordingly. Does anyone know how to programmatically find the value of this index so that I know which plot labels the user sees. I've tried looking at the property node but I can't see anything that gives me what I need.
0 Kudos
Message 1 of 7
(4,073 Views)
or for that matter howto make is a certain width on the VI, mine keeps resizing itself to match the names of my plots.
0 Kudos
Message 2 of 7
(4,061 Views)

Hi guys,

At the moment it looks like there is no specific property node for that particular function, as you had already guessed. The scrollbar is only a very recent addition to LV so maybe a product suggestion for it's inclusion might be worthwhile. You could possibly get around the problem though by using an invisible control underneath and event structures to essentially work out whether they have scrolled up and down and therefore which one they are looking at. This would be tricky though so only undertake if you fancy it!

As for the second post, you should be able to achieve this by setting the size on the scroll bar size property as shown in the attached screenshot.

Best wishes
Rob L

NI Applications Engineer

UK & Ireland


It only takes a click to rate this message 😉
Message 3 of 7
(4,024 Views)

Thanks for your reply Rob.

I was thinking that was the case. Sometimes it’s possible that there are clever little tricks hidden away in the set up screens. I’ve ended up now with my old method which looks very clumsy (see attached vi), I can make it look much better when I get the scroll bar position.

 

I’ll follow up on the product suggestion though as it would be a very useful feature.
Message 4 of 7
(4,009 Views)

I find that legend-size property very...buggy. And it does not resize the name-part that I want it to, but instead it rezises the small window showing the plot properties. Or have I done something wrong? I put the essential parts into an example program, please take a look.

 

Anders

0 Kudos
Message 5 of 7
(3,996 Views)

Hi guys,

Firstly, Tohatsu, you're right with the clumsyness of legend, that looks to be the only manipulation you have. Again I would reccomend a product suggestion (the scroll bar was asked for in LV 8.2 and was included in 8.5! so it does work!!) to improve the precision you have over this particular control.

Ian, what a gem of a bit of code. Often the way in LV t aht we have to work around these things, hopefully the improvements will be implemented..

Best wishes

Rob
Rob L

NI Applications Engineer

UK & Ireland


It only takes a click to rate this message 😉
0 Kudos
Message 6 of 7
(3,991 Views)
Thanks Rob. I've put in my suggestion. I'll now wait patiently for any changes, and an improvement for the sizing issue.
 
It's amazing how LabVIEW has changed since I started using it with v4, the trouble is the more you give us the more we try and stretch it to the limits.
Message 7 of 7
(3,985 Views)