Jump to content
dharmendra

Labview Animation Control or indicator

Recommended Posts

You can add an animated GIF as a decor to a button, just like other image types.

See attached ctrl.AnimatedGIF.ctl

Share this post


Link to post
Share on other sites

I thought this was an interesting exercise so here is my attempt.  OpenG has some image tools and one of them is the ability to open a GIF, but for some reason it crapped out and died with your GIF even after resaving it to something much smaller.  I did find some other GIF API over on the dark side and instead used that.  Attached is a zip, extract it and run Demo Saving Button.  It will show the first image.  Then when you click the image it cycles through the first half of the GIF and waits for the simulated save process to complete.  Once it is complete it rotates through the second half of the images, and then after a few seconds returns back to the first.  Parsing of the GIF takes time so I put in the GIF images as a constant, along with the code to parse the GIF.  I also set the pane to be the color of the (0,0) pixel in the hopes it will blend in better.  Honestly this could be turned into a QControl and be made very seemless.

Demo Saving Button Gif.zip

  • Like 2

Share this post


Link to post
Share on other sites

You can replace individual elements of controls with GIFs too.

I once replaced the pointer in a horizontal point slide with an animated GIF to make a custom progress bar.

In my application I opted for a GIF of two turtles engaging in sexual congress. 

 

 

Edited by Edc

Share this post


Link to post
Share on other sites

Neat idea editing the control itself.  But that solution is only going to work if you don't mind having no control over the GIF and don't mind looping, and if you don't need to update the GIF at runtime based on an existing file.  The demo I showed saved the GIF as a constant in the block diagram because it is faster, but I have some disabled diagram code that will instead read the GIF from a file.  It then will play the first half of the GIF, then wait for the saving to finish (random number) then play the second half.  Is there a site where simple animations like this can be used for free?  Also back saved to 2016.

2016 Save Demo.zip

Share this post


Link to post
Share on other sites

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.