# Label Border Property on Vision screens on mouseEntered Event

**URL:** <https://forum.inductiveautomation.com/t/label-border-property-on-vision-screens-on-mouseentered-event/66200>\
**Category:** Ignition\
**Tags:** vision\
**Created:** [November 7, 2022, 7:37pm UTC](https://forum.inductiveautomation.com/t/label-border-property-on-vision-screens-on-mouseentered-event/66200 "2022-11-07T19:37:45Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Garrett\_Stocksdale](https://avatars.discourse-cdn.com/v4/letter/g/e19adc/32.png) [@Garrett\_Stocksdale](https://forum.inductiveautomation.com/u/Garrett_Stocksdale)\
**Post date:** [November 7, 2022, 7:37pm UTC](https://forum.inductiveautomation.com/t/label-border-property-on-vision-screens-on-mouseentered-event/66200/1 "2022-11-07T19:37:45Z")

</div>

I have created a popup screen in Vision with selectable labels and want there to be an outline when the user hovers over the label they wish to select. I attempted to use the mouseEntered event along with the Set Property script builder. However, the Set Property is looking for a value to send to the label's border. It does not accept numerical values or strings like "Line Border".

Is there a list somewhere of acceptable values or is there an easier way of going about this?

---

<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:** [November 7, 2022, 7:46pm UTC](https://forum.inductiveautomation.com/t/label-border-property-on-vision-screens-on-mouseentered-event/66200/2 "2022-11-07T19:46:12Z")

</div>

Have your mouse entered/mouse exited events simply set a custom property with a Color type. Use [`toBorder`](https://docs.inductiveautomation.com/display/DOC81/toBorder) in an expression binding on the border property to bring in the custom color.

---

<div class="post-metadata">

**Author:** ![Garrett\_Stocksdale](https://avatars.discourse-cdn.com/v4/letter/g/e19adc/32.png) [@Garrett\_Stocksdale](https://forum.inductiveautomation.com/u/Garrett_Stocksdale)\
**Post date:** [November 7, 2022, 7:59pm UTC](https://forum.inductiveautomation.com/t/label-border-property-on-vision-screens-on-mouseentered-event/66200/3 "2022-11-07T19:59:44Z")

</div>

It looks like with the toBorder you will need more than just the color if you were to use for example toBorder(line; color; thickness). I am getting an error because the Color class cannot accept both values.

---

<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:** [November 7, 2022, 8:09pm UTC](https://forum.inductiveautomation.com/t/label-border-property-on-vision-screens-on-mouseentered-event/66200/4 "2022-11-07T20:09:55Z")

</div>

Your expression would be something like:  
`toBorder("line;" + {Root Container.Text Field.borderColor} + ";2")`

![Kapture 2022-11-07 at 12.09.17](https://us1.discourse-cdn.com/inductiveautomation/original/3X/4/5/453ee3056b120d4050b71c7b2335eb86c25125a0.gif)

---

<div class="post-metadata">

**Author:** ![Garrett\_Stocksdale](https://avatars.discourse-cdn.com/v4/letter/g/e19adc/32.png) [@Garrett\_Stocksdale](https://forum.inductiveautomation.com/u/Garrett_Stocksdale)\
**Post date:** [November 7, 2022, 8:28pm UTC](https://forum.inductiveautomation.com/t/label-border-property-on-vision-screens-on-mouseentered-event/66200/5 "2022-11-07T20:28:30Z")

</div>

That works! Thank you very much. I just changed the default color to the background, so it only appears when mousing over. Just to pick your brain is there a way to add padding in the box?

---

<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:** [November 7, 2022, 8:31pm UTC](https://forum.inductiveautomation.com/t/label-border-property-on-vision-screens-on-mouseentered-event/66200/6 "2022-11-07T20:31:44Z")

</div>

Not without getting a fair bit more involved. You _can_ create borders with scripting, which would be more ultimately flexible, but may be harder to reason about.  
See: [BorderFactory (Java SE 11 & JDK 11 )](https://docs.oracle.com/en/java/javase/11/docs/api/java.desktop/javax/swing/BorderFactory.html)

So creating a border with padding is usually accomplish (in Java Swing) by creating a 'compound' border; you can use an 'empty border' as part of the compound border to add padding, and whatever border style you want for the other half of the compound border.
