10-28-2019 04:41 AM - edited 10-28-2019 04:42 AM
Hello everyone,
I want to customize / create some buttons and I want to use a custom background as well.
My problem is, that if I use a png file as background, the image will stretch when I resize the button. This is not the case for included buttons (see pic 1).
I know a feature in other software called "slicing", which allows the user to split a graphic in 9 tiles (see pic 2). When the image get resized, the corners keep there size and the other tiles will stretch depending on there position.
Is there a similar function in LabVIEW 2017? And if so, where can I find and use it?
Regards,
Fab
Solved! Go to Solution.
10-28-2019 05:16 AM
It's a very interesting question, I've tried to do that in the past (2014-2015) and then gave up. I've never seen any evidence of anyone doing it.
I've been using the UI Tools made by François Normandin, it includes "Control Generator" that is really helpful if you have several sets of pngs (some for button frames and some for glyphs)
I'm using 2018 now, I don't really put that much effort into UI design anymore... Good luck to you!
We have two ears and one mouth so that we can listen twice as much as we speak.
Epictetus
10-28-2019 09:50 AM
You can't use png. It has to be a vector image.
Use a LabVIEW decoration (or copy a component from another control) instead.
wmf, or emf might work sometimes.
10-29-2019 05:21 AM
Hello TiTou, Hello Zou,
thank you both for your replies 🙂
@TiTou: I will try out the tools you recommended.
@Zou: The trick with the decoration is really helpful. Copying a decoration and import it to the button is the way I go now.
I tried to import some other file formats to LabVIEW, like you recommended it. Only emf works for me. This format works fine with resizing in both direction. Unfortunately the corners will lose there form, if I only scale in one direction. But I am sure, that this will help with custom icons.
Regards,
Fab