LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Custom Keyboard Like Button

Solved!
Go to solution

I have made a custom button that looks like a button on a computer keyboard.  When not selected it appears to be raised and when selected it appears lowered.  The issue I have is when selected the top and bottom of the button change so it is lowered to the centerline ot the button and I would like it to be pressed to the bottom of the image.  How can I make this happen?

 

Thanks for the help!

0 Kudos
Message 1 of 5
(2,542 Views)

Don't have LV here and can't make out what you're trying to say.

 

Generally for an animation like this you want the image for both frames to be the same size. That way you can place the button where you want in the frame to maintain the relative positions you want for each frame.

 

Does that answer the question?

0 Kudos
Message 2 of 5
(2,520 Views)

Here is a Jpeg of the image that I am talking about.  Button.jpg is what happens, and Button 1.jpg is what I would prefer to happen. 

 

Thanks!

Download All
0 Kudos
Message 3 of 5
(2,492 Views)
Solution
Accepted by nutmegzzz

Hey,

I believe you are looking for something like this?
(See attached)

You can edit it as a custom control. Open the custom control and enter customise mode, Right click on the button and check the "independent sizes" option. This let's you customise the on state and off state seperately.

You can select the different states by right clicking again and expanding "picture items."

When the button is "up" I left the control as is, when the button is "down" I moved that state so that the base was the same level as the base of the "up" state, leading to the illusion of a keyboard button press.

 

Hope I explained that well enough and it helps out! 

Thanks,
Justin, Applications Engineer
Message 4 of 5
(2,432 Views)

That explains it perfectly thanks!

0 Kudos
Message 5 of 5
(2,423 Views)