Graeme Posted January 5, 2008 Report Share Posted January 5, 2008 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. Quote Link to comment
tnt Posted January 8, 2008 Report Share Posted January 8, 2008 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 Quote Link to comment
Ton Plomp Posted January 8, 2008 Report Share Posted January 8, 2008 QUOTE(tnt @ Jan 7 2008, 09:38 AM) 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 What about a separate pane for the cluster? With the following code I had no issues: http://lavag.org/old_files/monthly_01_2008/post-2399-1199696991.png' target="_blank"> Ton Quote Link to comment
Graeme Posted January 8, 2008 Author Report Share Posted January 8, 2008 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. Quote Link to comment
Matt W Posted January 8, 2008 Report Share Posted January 8, 2008 QUOTE(Graeme @ Jan 7 2008, 01:11 PM) 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. You can also remove the flashing by defering panel updates, during the for loop. http://lavag.org/old_files/monthly_01_2008/post-7834-1199740584.png' target="_blank"> Matt W Quote Link to comment
Graeme Posted January 8, 2008 Author Report Share Posted January 8, 2008 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. Quote Link to comment
Graeme Posted January 9, 2008 Author Report Share Posted January 9, 2008 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. Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.