From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Bug? Button Appearance is changed with hidden boolean text

I encountered the following problem with customized buttons:


I created a button,  made label, caption an boolean text invisible, then added a picture to decal and resized the button to fit to the picture. This means, i had to decrease the width. Everyting works fine on my development machine. There is installed LV2012f3 on Win7 x64.

When I open the VI or the created EXE on my Laptop, the Button changes in size and position. There is the same LV Version installed on WinXP 32bit.
This problem occurred with only two of several buttons. The other buttons didn't show this behaviour.
The pictures below illustrate this problem.

 

 

Now I found out, that the hidden boolean text was the reason for this behaviour. Because at these two buttons the boolean text is wider than the actual width of the button, LabVIEW resizes the button when opening in a different runtime environment(?)
So the workaround is, to delete the unneeded boolean text.

 

Greets, Dave
Download All
Message 1 of 4
(2,244 Views)

I think the logic behind this behavior is that while the text is hidden, you could show it programatically and presumably you wouldn't want the button size to change at that point, so the text is taken into account even if it's hidden.

 

Of course, you could also change the font size at run-time, which would also change the control size, so it could be argued that the control should only grow when you show the text.

 

Either way, I don't think this is so much a bug as it is unexpected behavior. The argument for how it should actually behave could go either way.


___________________
Try to take over the world!
0 Kudos
Message 2 of 4
(2,232 Views)

Hi tst,

 

this sounds reasonable. The strange thing is, that it only occurs when changing the Windows Version.

But knowing the reason, it's easy to avoid this behaviour.

 

 

 

Greets, Dave
0 Kudos
Message 3 of 4
(2,223 Views)

Thank you for sharing this, Dave!

Paolo
-------------------
LV 7.1, 2011, 2017, 2019, 2021
0 Kudos
Message 4 of 4
(2,216 Views)