# Textbox Border Change on Focus

**URL:** <https://forum.inductiveautomation.com/t/textbox-border-change-on-focus/112527>\
**Category:** Ignition\
**Tags:** ignition81, vision\
**Created:** [December 1, 2025, 3:59pm UTC](https://forum.inductiveautomation.com/t/textbox-border-change-on-focus/112527 "2025-12-01T15:59:51Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![warren](https://avatars.discourse-cdn.com/v4/letter/w/97f17d/32.png) [@warren](https://forum.inductiveautomation.com/u/warren)\
**Post date:** [December 1, 2025, 3:59pm UTC](https://forum.inductiveautomation.com/t/textbox-border-change-on-focus/112527/1 "2025-12-01T15:59:52Z")

</div>

I’m looking for a way to highlight or alter the border of a textbox while the mouse is hovered over the particular textbox?

I’ve used toBorder functions in expression bindings but for a textbox that will not work in the script. What else could I use?

---

<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:** [December 1, 2025, 4:13pm UTC](https://forum.inductiveautomation.com/t/textbox-border-change-on-focus/112527/2 "2025-12-01T16:13:43Z")

</div>

Import [BorderFactory](https://docs.oracle.com/en/java/javase/11/docs/api/java.desktop/javax/swing/BorderFactory.html) in a project library script and call its static methods from your events.

In the Library:

```python
from javax.swing import BorderFactory

```

In your event:

```python
event.source.border = someLibScript.BorderFactory.createSomeBorder(...)

```
