LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

GIF as a custom control.

Hi! I made a control of just boolean indicator and replaced graphics using animated .GIF files that I made, one for True and one for False state of the "button". When I created the array of such buttons, it is showing some weird signs such as when I press one element of the array, the whole array gets True or some glitches on the animation. Why is that?
I am trying to make just a game that when boolean indicator is ON, there is a car and when it's off it's just a road. Uploaded the files of project and the custom control I made. Thank you.

Download All
0 Kudos
Message 1 of 5
(939 Views)

Take a look at this. I explain how to do this in this nugget.

 

https://forums.ni.com/t5/LabVIEW/Custom-Button-Nugget/m-p/1564566

Tim
GHSP
0 Kudos
Message 2 of 5
(904 Views)

I'd say, the thing with the glitches is simply due to the fact that LV is not made to display animations and definitely not several at once.

I cannot run your VI as I got LV 2021, so I can't say something about the other problem. 

0 Kudos
Message 3 of 5
(902 Views)

@MaSta wrote:

I'd say, the thing with the glitches is simply due to the fact that LV is not made to display animations and definitely not several at once.

I cannot run your VI as I got LV 2021, so I can't say something about the other problem. 


I cannot open OP's VI too.

But LabVIEW is capable of display multiple animated gifs at the same time.  See attached VI.

 

I guess the problem is using the button in an array.

 

 

 

George Zou
0 Kudos
Message 4 of 5
(867 Views)

Probably.  The thing about using an array as a control/indicator in LabVIEW that can be misleading is the following.

 

What can be different from one element to the next:

  • Data values

 

What has to be the same from one element to the next:

  • Everything else

 

The "everything else" includes stuff you wouldn't think about normally, but things like fonts, colors, the position of a scroll bar in a scrolling text indicator, the position of an array index, and so on are all forced to be identical.  So unless your graphic is a data value... that's probably why.

0 Kudos
Message 5 of 5
(850 Views)