LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Filter Decoration events

Is it possible to filter decoration events (if there is such a thing).  Essentially I overlay some images ontop of controls for a custom look to an application.  These Decorations are on top and transparent.  They have to be in front to be ontop of controls.  Since the decorations are in front they block mouse events to the underlying control, which is undesired.  Essentailly can I work around this?  I want to overlay a decoration onto a control without blocking the event structure.  This is much like the decal in a button, an immage which floats ontop of a button but does not interace with user events.  I am using the decal already in addition to this overlay so that cant be used. 
Paul Falkenstein
Coleman Technologies Inc.
CLA, CPI, AIA-Vision
Labview 4.0- 2013, RT, Vision, FPGA
0 Kudos
Message 1 of 11
(3,672 Views)

Unfortunately, decorations don't have events. You could handle the pane's MouseDown event and then see where the mouse click occurred to determine if it occurred over a button. However, this would still not provide the visual feedback of clicking a button, and if it's another type of control (like a slider) you wouldn't be able to manipulate it.

 

One thing that I'm not sure I understand is why they have to be in front. If they're transparent, why can't you move them to the back? I'm assuming that only part of it is transparent - i.e., the part that is over the control. Otherwise, how would you even see it?

Message Edited by smercurio_fc on 04-22-2009 01:02 PM
0 Kudos
Message 2 of 11
(3,665 Views)
Make the decoration part of the control and you should be ok.  I made a quick test where I took a button, customized it to have a circle decoration over part of it and then stuck it on my front panel.  I then checked the mouse down filter event for the control and when you click on the decoration or the non decoration part both fire the event.
0 Kudos
Message 3 of 11
(3,658 Views)

Essentially this is an overlay on a control to give the control a paticualr look (The overlay is only semi transparent)  So it works like a decal on the control.  If it was behind the control then I would not see the overlay.  I originally mad the overlay on a custom control but this blocked the mouse down default action.  I want my button to work like a regular button but the button has a semitransparent overlay to give it a particular look.

 

 

Paul Falkenstein
Coleman Technologies Inc.
CLA, CPI, AIA-Vision
Labview 4.0- 2013, RT, Vision, FPGA
0 Kudos
Message 4 of 11
(3,640 Views)
I don't know what kind of look you're trying to achieve, so perhaps if you posted an example it may help to clarify. But, is there an issue with simply changing the button's images so the have the look you want? JKI did a video tutorial on customizing buttons to use images, and still have them behave normally.
0 Kudos
Message 5 of 11
(3,633 Views)
Here is the problem, I have seen the tutorials and am familiar with customizing controls.  Labview essentially lets parts of controls either be raplaced with decorations (very limited choices but allows for tying to FG,BG changes at both edit-time and runtime) or importing graphica as an image (Can get any shape but have to decide on color ahead of time, so generic controls where colors can be changed is not possible).  I am trying to leave the controls using the labviews decoration palettes as the main parts of a control but overlay a semitransparent png ontop of my control.  This overlay blocks the controls actions.  Some how a decal on a button does not block the user default action on a control.
Paul Falkenstein
Coleman Technologies Inc.
CLA, CPI, AIA-Vision
Labview 4.0- 2013, RT, Vision, FPGA
0 Kudos
Message 6 of 11
(3,628 Views)

Hi Paul,

 

What if you put the controls on top, and make them transparent?  Then the decoration will show through and you can still get your events on the control.

 

Best Regards,

Bryan H.
0 Kudos
Message 7 of 11
(3,597 Views)

The controls are made from labview decorations so I can still change the FG and BG colors.  Labview decorations do not allow for transparency except for full transparent (no alpha channel).  I seem stuck.  If I put the control in front then I will not the overlay behind.  It is about time ni upgrades this capability, labview applications get stuck looking too much like labview applications.  Many times I can remove any precieved bias against labview by making a very custom front pannel.  I am trying to expand my toolkit of buttons but always reach limitations.  How did NI implement the decal feture on buttons, essentially allowing an overlay on a control without blocking the default click action?

 

Paul Falkenstein
Coleman Technologies Inc.
CLA, CPI, AIA-Vision
Labview 4.0- 2013, RT, Vision, FPGA
0 Kudos
Message 8 of 11
(3,584 Views)
Can you attach an example control or VI so we can all play around and see if someone has a creative solution?
0 Kudos
Message 9 of 11
(3,575 Views)

Maybe you could place the decoration inside a transparent cluster, so you access the events at least and pass them to the control.

 

Felix 

0 Kudos
Message 10 of 11
(3,518 Views)