LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Vanishing custom button images?

No joy on the PNG thing. Will let you know how the strictly typed setting works out. Cheers.
0 Kudos
Message 11 of 27
(682 Views)
No, I'm afraid the Strictly setting didn't make a difference either. 😞
0 Kudos
Message 12 of 27
(667 Views)

Hi Mitsurugi,

 

I'm currently running your code and unfortunately I haven't experienced the same issue you saw yet.

 

However I did notice on your block diagram that you lack timing in your while loop. I'd recommend that you insert a "Wait until next ms Multiple" function from the Functions-> Programming-> Timing palette with a constant such as 10 into your loop. This provides time for the processor to rest. If the disappearance is actually caused by your graphics card being 'maxed out' then this timing may also help to solve this issue.

 

Hope this helps and I will keep your code running to see if I can also observe the problem,

 

Tori
Student
0 Kudos
Message 13 of 27
(665 Views)

@Mitsurugi wrote:
No, I'm afraid the Strictly setting didn't make a difference either. 😞

Hmmm.  It didn't disappear on me after setting it to strictly typed.  Perhaps I didn't wait long enough.  Tori.M has a good suggestion.  I didn't notice your lack of timing in the while loop.  As a matter of efficiency and good practice, regardless of your application, you should include a wait in your while loop, unless it's already built in, so as not to over-tax the processor.

-----------------------------------------------------------------------------------------
Reese, (former CLAD, future CLD)

Some people call me the Space Cowboy!
Some call me the gangster of love.
Some people call me MoReese!
...I'm right here baby, right here, right here, right here at home
0 Kudos
Message 14 of 27
(658 Views)

Hi again MoReese & Mitsurugi,

 

After replicating your error and seeing that it still occurred with timing in the loop, I remade your code including both the VI and buttons.

 

These don't seem to disappear (correct me if you observe the same problem) which suggests that either the buttons or the VI was corrupted in your code.

 

Make a new project and add them in and have a look Smiley Happy

 

Hope this fixes everything!!

Tori
Student
0 Kudos
Message 15 of 27
(641 Views)

Thanks for that, I'll check it out.

 

 

0 Kudos
Message 16 of 27
(632 Views)
Hiya Tori. I wouldn't think it was the VI itself that was playing up, because there are a host of other custom buttons on the app we're building and none of them are affected in the same way my buttons are. Definitely something about the way my buttons were built I'm thinking. Anyway, thanks for the code you uploaded. Got it on screen now waiting to see if the problem still persists. Quick question though, when you were creating your buttons, what TYPE of button did you use (push button, rocker, slide switch, toggle switch, etc)....?
0 Kudos
Message 17 of 27
(629 Views)

Hi Mitsurugi,

 

In the zip file, the controls I remade are also included. You can customise most of the controls, but I just used a Boolean Stop with the mechanical action "latch when pressed".

 

Couple of other things I did, but are unlikely to have caused the issue:

 

I converted your images to .png format - although GIFs are usable, PNGs are generally preferable. As suggested by MoReese, I also used Type Def controls.

 

Fingers crossed the code being remade has managed to tackle the problem!

Tori
Student
0 Kudos
Message 18 of 27
(626 Views)

Hi Mitsurugi,

 

Just wondering if the new VI and custom controls fixed the "disappearing" issue that you were having?

 

Let me know!

Tori
Student
0 Kudos
Message 19 of 27
(595 Views)

Hullo Tori.

 

The answer to your question is Yes AND No.

 

The buttons you sent over worked great....but when I tried to replicate what you did (mechanical action, file type, and all that) I still got the same blank buttons. In a last ditch effort I tried making a copy of your buttons, and modifying those, but that only resulted in the same outcome.

 

I've no idea what I'm doing different to you guys, and I don't know what else to try.

 

If only they'd let us drink in the office, y'know? 😞

 

Anyway, some more questions:

- regarding the images, did you do anything other than change the file extension from .gif to .png?

- when you allocated the .png to a given button's picture items, what method do you use: "import from file" or "import from clipboard"?

- any major difference or advantages between the two methods?

 

Thanks.

 

Mitsurugi.

0 Kudos
Message 20 of 27
(580 Views)