LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Image on custom button control blocks mouse operation

Solved!
Go to solution

Hi everyone,

 

I've created a custom button control from the 'Silver' Blank Button and I've placed a png image on the button (see attached).

 

Unfortunately the button will only operate if the mouse is placed at certain positions on the button and this is also affected by moving the image forward or backwards on the button.

 

No matter what I try I cannot get the mouse to work on the lower darker half of the button when clicking on the image.

 

Any suggestion would be very much appreciated.

0 Kudos
Message 1 of 5
(1,426 Views)

Use a mouse down / up filter event and compare the position to the bounds of the control.

 

Control bounds is readable from a control property node.   Mouse position can be read from the event case left node ( you may need to select it but I think it's available by default on mouse filter events)


"Should be" isn't "Is" -Jay
0 Kudos
Message 2 of 5
(1,407 Views)
Solution
Accepted by topic author asnuaaron

You usually want to add Boolean images as either a decal, or as replacement of one of the button's images.

 

Then they won't block the mouse.

0 Kudos
Message 3 of 5
(1,397 Views)

Thanks 

 

 

 

0 Kudos
Message 4 of 5
(1,394 Views)

Thanks 

 

Message 5 of 5
(1,383 Views)