04-24-2013 04:39 AM - edited 04-24-2013 04:46 AM
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.
04-24-2013 05:03 AM
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.
04-24-2013 06:09 AM
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.
04-24-2013 07:24 AM
Thank you for sharing this, Dave!