# Using labels as buttons

**URL:** <https://forum.inductiveautomation.com/t/using-labels-as-buttons/116410>\
**Category:** Ignition\
**Tags:** vision\
**Created:** [July 15, 2026, 8:01am UTC](https://forum.inductiveautomation.com/t/using-labels-as-buttons/116410 "2026-07-15T08:01:12Z")\
**Posts on this page:** 13\
**Page:** 1

<div class="post-metadata">

**Author:** ![Thomas\_Mulcahy](https://avatars.discourse-cdn.com/v4/letter/t/f1d935/32.png) [@Thomas\_Mulcahy](https://forum.inductiveautomation.com/u/Thomas_Mulcahy)\
**Post date:** [July 15, 2026, 8:01am UTC](https://forum.inductiveautomation.com/t/using-labels-as-buttons/116410/1 "2026-07-15T08:01:12Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![justinedwards.jle](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/justinedwards.jle/32/37854_2.png) [@justinedwards.jle](https://forum.inductiveautomation.com/u/justinedwards.jle)\
**Post date:** [July 15, 2026, 8:33am UTC](https://forum.inductiveautomation.com/t/using-labels-as-buttons/116410/2 "2026-07-15T08:33:56Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Thomas\_Mulcahy](https://avatars.discourse-cdn.com/v4/letter/t/f1d935/32.png) [@Thomas\_Mulcahy](https://forum.inductiveautomation.com/u/Thomas_Mulcahy)\
**Post date:** [July 15, 2026, 8:37am UTC](https://forum.inductiveautomation.com/t/using-labels-as-buttons/116410/3 "2026-07-15T08:37:51Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![pturmel](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pturmel/32/3295_2.png) [@pturmel](https://forum.inductiveautomation.com/u/pturmel)\
**Post date:** [July 15, 2026, 12:23pm UTC](https://forum.inductiveautomation.com/t/using-labels-as-buttons/116410/4 "2026-07-15T12:23:27Z")

</div>

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.)

---

<div class="post-metadata">

**Author:** ![bobby.miller](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/bobby.miller/32/85153_2.png) [@bobby.miller](https://forum.inductiveautomation.com/u/bobby.miller)\
**Post date:** [July 15, 2026, 12:27pm UTC](https://forum.inductiveautomation.com/t/using-labels-as-buttons/116410/5 "2026-07-15T12:27:26Z")

</div>

To carry this a step further, you can make a transparent button overlayed on your label and use that as your actionPerformed controller.

---

<div class="post-metadata">

**Author:** ![Thomas\_Mulcahy](https://avatars.discourse-cdn.com/v4/letter/t/f1d935/32.png) [@Thomas\_Mulcahy](https://forum.inductiveautomation.com/u/Thomas_Mulcahy)\
**Post date:** [July 15, 2026, 12:36pm UTC](https://forum.inductiveautomation.com/t/using-labels-as-buttons/116410/6 "2026-07-15T12:36:27Z")

</div>

They are suggesting that reading tags through a script on a label acts differently to a script on a button. I bind any tags to custom properties anyway then read their value from there, in read of using readBlocking/readAsync. In my mind there is no logical difference here when utilising the bound property in a script.

---

<div class="post-metadata">

**Author:** ![Steve\_Laubach](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/steve_laubach/32/60900_2.png) [@Steve\_Laubach](https://forum.inductiveautomation.com/u/Steve_Laubach)\
**Post date:** [July 15, 2026, 12:50pm UTC](https://forum.inductiveautomation.com/t/using-labels-as-buttons/116410/7 "2026-07-15T12:50:46Z")

</div>

What Phil said.

I have also seen some touchscreen drivers sometimes miss touch events in their default installation configuration but there are other events that were added to labels (not sure when) that seem to solve that problem. I think it was the pointer events that were working on touchscreens that would sometimes miss click events but I could be remembering wrong.

Buttons pick up some default styles that can be a little more awkward. It would be good if IA made a "label button" or maybe a better named control that is basically a label with all the things that a button has without all the default button styles. There's a lot of situations where I would want a hitbox on something but do not want to style the hitbox. My current solution for those situations is to use a button and style the opacity to 0 which feels like a kludge.

---

<div class="post-metadata">

**Author:** ![paul-griffith](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/paul-griffith/32/37249_2.png) [@paul-griffith](https://forum.inductiveautomation.com/u/paul-griffith)\
**Post date:** [July 15, 2026, 5:23pm UTC](https://forum.inductiveautomation.com/t/using-labels-as-buttons/116410/8 "2026-07-15T17:23:44Z")

</div>

Labels-as-buttons are completely inaccessible to keyboard users. You can't tab into a label, press space to hit the button, tab out to the next control. If you're already doing all your scripting against the mouse everywhere else this is probably a moot point, but you're giving up functionality.

---

<div class="post-metadata">

**Author:** ![justinedwards.jle](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/justinedwards.jle/32/37854_2.png) [@justinedwards.jle](https://forum.inductiveautomation.com/u/justinedwards.jle)\
**Post date:** [July 16, 2026, 1:06am UTC](https://forum.inductiveautomation.com/t/using-labels-as-buttons/116410/9 "2026-07-16T01:06:26Z")

</div>

> [@paul-griffith](#):
>
> You can't tab into a label

That's a great point. I like being able to use a mouse or a keyboard, and I often fret over things like tab order and enter key functionality when I do form design. I don't see a way to use a label button for that.

---

<div class="post-metadata">

**Author:** ![Thomas\_Mulcahy](https://avatars.discourse-cdn.com/v4/letter/t/f1d935/32.png) [@Thomas\_Mulcahy](https://forum.inductiveautomation.com/u/Thomas_Mulcahy)\
**Post date:** [July 16, 2026, 7:54am UTC](https://forum.inductiveautomation.com/t/using-labels-as-buttons/116410/10 "2026-07-16T07:54:05Z")

</div>

Yes, that is a good point. That would hinder functionality.

---

<div class="post-metadata">

**Author:** ![Transistor](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/transistor/32/3380_2.png) [@Transistor](https://forum.inductiveautomation.com/u/Transistor)\
**Post date:** [July 16, 2026, 3:28pm UTC](https://forum.inductiveautomation.com/t/using-labels-as-buttons/116410/11 "2026-07-16T15:28:04Z")

</div>

So, if you've been convinced that a transparent button overlay is the way to go, you may need to give some visible indication that it has the focus when arriving there via the tab key.

---

<div class="post-metadata">

**Author:** ![lrose](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/lrose/32/62724_2.png) [@lrose](https://forum.inductiveautomation.com/u/lrose)\
**Post date:** [July 16, 2026, 4:22pm UTC](https://forum.inductiveautomation.com/t/using-labels-as-buttons/116410/12 "2026-07-16T16:22:18Z")

</div>

> [@Thomas\_Mulcahy](#):
>
> Mainly, I can overlay a label on a rectangle and have the rectangle look like the button with rounded corners, etc.

Just wanted to point out that it isn't impossible to achieve complex styling with a stock button, if you're willing to do a little scripting.

> [@Customised button as an SVG file](https://forum.inductiveautomation.com/t/customised-button-as-an-svg-file/53745/6):
>
> Rounded Edges aren’t too difficult, though I’m not sure it’s really worth the effort, depending on the size of your project. For posterities sake: In the internalFrameActivated event of a window you can place this code (I put mine in a momentary button for ease of use, so this will not work as is in an internalFrame event, the code for getting a reference to the button will need to change. from java.awt import Insets from javax.swing.border import CompoundBorder class RoundedBorder(Compound…

Not too difficult to also allow the background to change on hover. The example in the linked thread uses a transparent background because I couldn't be bothered at the time to write a renderer, but while not trivial is not unattainable either.

---

<div class="post-metadata">

**Author:** ![nminchin](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/nminchin/32/6911_2.png) [@nminchin](https://forum.inductiveautomation.com/u/nminchin)\
**Post date:** [July 17, 2026, 2:58am UTC](https://forum.inductiveautomation.com/t/using-labels-as-buttons/116410/13 "2026-07-17T02:58:21Z")

</div>

> [@lrose](#):
>
> but while not trivial is not unattainable either.

I daresay ol' mate Claude could make it simple
