LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

boolean control appearance

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

0 Kudos
Message 1 of 6
(3,299 Views)

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.

0 Kudos
Message 2 of 6
(3,293 Views)

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

 

 

 

 

----------------------------------------------------------------------------------------------------------------
Founding (and only) member of AUITA - the Anti UI Thread Association.
----------------------------------------------------------------------------------------------------------------
Download All
0 Kudos
Message 3 of 6
(3,270 Views)

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,

0 Kudos
Message 4 of 6
(3,201 Views)

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

 

 

David
www.controlsoftwaresolutions.com
0 Kudos
Message 5 of 6
(3,188 Views)
thanks a lot, exactly what I was looking for but was not looking in the right palette
0 Kudos
Message 6 of 6
(3,173 Views)