Dharmendra Patel Posted December 31, 2019 Report Share Posted December 31, 2019 Can we make labview animation buttons like web page. for reference find below gif. Quote Link to comment
Zou Posted January 1, 2020 Report Share Posted January 1, 2020 You can add an animated GIF as a decor to a button, just like other image types. See attached ctrl.AnimatedGIF.ctl Quote Link to comment
Popular Post hooovahh Posted January 2, 2020 Popular Post Report Share Posted January 2, 2020 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 5 Quote Link to comment
Edc Posted January 13, 2020 Report Share Posted January 13, 2020 (edited) 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 January 13, 2020 by Edc Quote Link to comment
Dharmendra Patel Posted January 13, 2020 Author Report Share Posted January 13, 2020 i am using Labview 2016. can you convert this code in 2016?? Quote Link to comment
hooovahh Posted January 13, 2020 Report Share Posted January 13, 2020 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 Quote Link to comment
Dharmendra Patel Posted November 26, 2020 Author Report Share Posted November 26, 2020 thanks @hooovahh its help me a lot I am very thankful. Quote Link to comment
hooovahh Posted November 30, 2020 Report Share Posted November 30, 2020 Glad it helped. Is there a repository somewhere of these types of gifs? I'd love to have a library of controls or something. Like I mentioned a QControl can probably handle this well. 1 Quote Link to comment
devaseelan Posted March 5, 2021 Report Share Posted March 5, 2021 Use Picture Ring Control/Indicator. Load Each image in Picture control. Now by Controlling Control values u can make animation like GIF 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.