12-24-2009 02:25 PM
Hello,
I am using a boolean control to trigger an event in an event structure. It is based on a value change and the mechanical action is set to switched when release. I do not care about the value of the control, I just want to trigger an event when the uer clicks on the control.
I want both values (true and false) of the button to show the same appearance. I have changed the properties (color, string ..) but there is still a slight difference (some sort of shadow) and I cannot see anywhere in the properties what the difference is.
Does anybody know how to do that?
thanks
12-24-2009 02:45 PM
Why not use a latched when released so that it pops back up once it is read in the program. The terminal would be placed in the event structure.
Or Disable the control so that is doesn't change state, but act on the Mouse Down event for the control.
12-25-2009 02:25 AM
I agree with Ravens Fan that using "Latched Mode" is preferred if possible and using mouse events is a good solution.
Here's another option:
> but there is still a slight difference (some sort of shadow)
The shadow is there because by default, buttons simulate a physical button being depressed.
You can get around this by creating a custom control. For boolean controls there are 4 pictures that show the state: Off, On, Off to On, and On to Off. You can set these to be whatever you want.
To make a custom control, right click on the control and select: Advanced > Customize...
The custom control must be saved as a "Strict Type Def.".
Here are some examples (LV2009):
steve
01-05-2010 09:05 AM
Hello,
Thanks for your answers.
I was actually looking at some code and I found such a button as I described earlier and I checked, they do not use type defs, see attached VI:
As I said, I cannot see the difference with a regular button when looking at the properties, maybe you know what the difference is?
thanks in advance,
01-05-2010 09:25 AM
it is normally useful to use strict type def if you do not want the appearence of the control to change. However, i think the control you attached is a simple button. You can create a similar button without a shadow using the 'flat square button' boolean in the classic controls palette. When customising the colours remember you can use the space bar to togle between the background and foreground colour.
Hope this helps
01-05-2010 10:44 AM