04-22-2009 12:21 PM
04-22-2009 01:01 PM - edited 04-22-2009 01:02 PM
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?
04-22-2009 01:15 PM
04-22-2009 02:04 PM
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.
04-22-2009 02:25 PM
04-22-2009 02:40 PM
04-23-2009 01:50 PM
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,
04-23-2009 07:12 PM
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?
04-23-2009 09:55 PM
04-27-2009 03:06 AM
Maybe you could place the decoration inside a transparent cluster, so you access the events at least and pass them to the control.
Felix