dee Posted February 3, 2008 Report Share Posted February 3, 2008 I got an annoying problem with my latest project. I have alot of controls. To control the visibility of them I use a vi that checks my list of controls that have to be visible and compares it with the actualy control list, turning it on or off. It works great but there is a noticeable lag (seconds) with this technique when there is an images pasted on the background. The lag is gone when I delete the background. Why is this? The image itself is not big. It's copy/pasted from a jpg. Quote Link to comment
Ton Plomp Posted February 3, 2008 Report Share Posted February 3, 2008 QUOTE(dee @ Feb 2 2008, 10:10 PM) I got an annoying problem with my latest project.I have alot of controls. To control the visibility of them I use a vi that checks my list of controls that have to be visible and compares it with the actualy control list, turning it on or off. It works great but there is a noticeable lag (seconds) with this technique when there is an images pasted on the background. The lag is gone when I delete the background. Why is this? The image itself is not big. It's copy/pasted from a jpg. First I would not close the VI reference until I would have finished processing Second the most importing thins is you need is 'Defer Panel updates' set that property to 'T' before the for loop, and to 'F' after the for loop. The slow factor because of the background is most likely because you have overlapping elements (the controls and the background). Ton Quote Link to comment
dee Posted February 4, 2008 Author Report Share Posted February 4, 2008 QUOTE(tcplomp @ Feb 2 2008, 10:37 PM) First I would not close the VI reference until I would have finished processingSecond the most importing thins is you need is 'Defer Panel updates' set that property to 'T' before the for loop, and to 'F' after the for loop. The slow factor because of the background is most likely because you have overlapping elements (the controls and the background). Ton Closing the references after everything is done raised the draw speed. Setting the defer panel updates fixed everything and eliminated all lag. Thanks! Quote Link to comment
ned Posted February 4, 2008 Report Share Posted February 4, 2008 As a side note, you could make your code more efficient by removing the boolean "not" and the case structure, and connecting the output of ">=0" directly to the "Visible" property node, unless there's something hidden in the True case of the case structure. 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.