Using labels as buttons

Hi,

I have a question about using labels as buttons in Vision. A colleague of mine suggested that labels shouldn't be used as buttons due to them not acting the same as buttons. I have used this method on multiple different Ignition projects now and I have had no issues.

Does anyone know if this is the case? If so, I will need to change my "label buttons" to momentary buttons. I am reluctant to do so, as I can style labels much better to fit the look and theme of the application. Mainly, I can overlay a label on a rectangle and have the rectangle look like the button with rounded corners, etc.

Thanks

Can you give us an idea of what these labels are actually doing? I imagine that a label's mouseClicked event handler is sufficient for a lot of things

It is just a mouse clicked event. The background of the rectangle is bound to an expression that changes the colour on hover. Other than that, they are fairly simple.

The major difference is that actual buttons have an actionPerformed event that honors enable/disable and security limits. Other events are uncontrolled. (Momentary buttons are another behavior entirely.)