Jump to content

Cluster with scroll bar - poor performance


Graeme

Recommended Posts

Hello everybody,

I have a cluster of string indicators, arranged vertically. There are too many indicators to fit on the screen. So, I knocked up something simple that would scroll the indicators up and down, to bring the ones I want to see into view. When I move the scrollbar down (scroll the indicators up) performance is satisfactory. However, when I do the opposite, there seems to be a sort of refresh problem that results in annoying flickering of some of the string indicators as they're scrolled. Difficult to describe, so try the attached VI if you're interested. I'm puzzled as to why the cluster scrolls nicely one way but not the other. If someone could explain what's happening, and even offer a solution, I would be forever in their debt.

Regards, Graeme.

Link to comment

QUOTE(Graeme @ Jan 4 2008, 10:39 PM)

Hello everybody,

I have a cluster of string indicators, arranged vertically. There are too many indicators to fit on the screen. So, I knocked up something simple that would scroll the indicators up and down, to bring the ones I want to see into view. When I move the scrollbar down (scroll the indicators up) performance is satisfactory. However, when I do the opposite, there seems to be a sort of refresh problem that results in annoying flickering of some of the string indicators as they're scrolled. Difficult to describe, so try the attached VI if you're interested. I'm puzzled as to why the cluster scrolls nicely one way but not the other. If someone could explain what's happening, and even offer a solution, I would be forever in their debt.

Regards, Graeme.

Hi,

I tried to open your vi but it is in LV8.5 and not in 8.0 as I expected according to your user info (8.0, 7.1, ).

Have you tried defer panel updates while re-arranging the indicators? (use LAVA-search for more info)

I have not seen your frontpanel, but is it an option for you to use an array instead

(only possible if all your indicators have the same type, see cluster to array and vice-versa),

then you get your scrollbar for free... (right mouse button: visible Items -> Scrollbar)

Happy wiring,

TNT

Link to comment

tnt,

Apologies for my incorrect profile. Appropriate action taken.

tcplomp,

I haven't tried your code yet, though I will. I did find a solution for mine, however. If you're scrolling up (cluster moving down) then reverse the array of cluster control references and reverse the array of control positions, i.e. process the cluster elements backwards, bottom to top. However, having done that, and now seeing your solution, this puts your solution at about 1/10th the size of mine!!! I'll try your code though I've never done anything multiple panes (knowingly!) so may need a pointer if (when) I get stuck.

Thank you both for your replies.

Regards, Graeme.

Link to comment

There are some good solutions here. Thank you. On a broader (somewhat off topic note) this brings something home to me. There's not much in LV that I haven't been able to do what I wanted to do. However, again and again, when I ask you guys for your solution, your solutions are so much neater and simpler than mine, using a fraction of the code that I do. I don't think I investigate Property and Invoke nodes as well as I think I do. I have another post on User Interface at the moment that I've only just managed to realise that my maths can be ditched and replaced with one Invoke node.

Thank you all again for your replies. I'll be following your leads with vigour!

Regards, Graeme.

Link to comment

Hi guys,

I've now had a closer look at your suggestions. MATTW provides a very good solution, very neat indeed. This solution srcolls much faster than mine, with less code too. I think tnt alluded to the same thing, but I needed it spelling out to me! My requirement was to keep the cluster frame in the same position, but scroll its elements up and down within the frame. I may have misled some here. Apologies if I did. Problem solved and thank you all for your inputs. As ever, I've learned more about LV from you.

Graeme.

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.