LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Customize Button: Slicing Background Image

Solved!
Go to solution

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

 

Customize Buttons (Marked).png    65kBY0g.png

0 Kudos
Message 1 of 4
(2,328 Views)

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

Antoine Chalons

Message 2 of 4
(2,309 Views)
Solution
Accepted by topic author Fab_L

You can't use png.  It has to be a vector image.

Use a LabVIEW decoration (or copy a component from another control) instead.

image.png

wmf, or emf might work sometimes.

 

George Zou
Message 3 of 4
(2,257 Views)

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

0 Kudos
Message 4 of 4
(2,226 Views)