Jump to content

drawing speed when controlling controls through reference


Recommended Posts

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.

labview01oi8.jpg

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.

Link to comment

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.

labview01oi8.jpg

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

Link to comment

QUOTE(tcplomp @ Feb 2 2008, 10:37 PM)

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

Closing the references after everything is done raised the draw speed.

Setting the defer panel updates fixed everything and eliminated all lag. Thanks!

Link to comment

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.

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.