# Vision Numeric Text Field underlined text

**URL:** <https://forum.inductiveautomation.com/t/vision-numeric-text-field-underlined-text/34396>\
**Category:** Ignition\
**Tags:** ignition79, vision\
**Created:** [May 4, 2020, 8:42am UTC](https://forum.inductiveautomation.com/t/vision-numeric-text-field-underlined-text/34396 "2020-05-04T08:42:12Z")\
**Posts on this page:** 2\
**Page:** 1

<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:** [May 4, 2020, 8:42am UTC](https://forum.inductiveautomation.com/t/vision-numeric-text-field-underlined-text/34396/1 "2020-05-04T08:42:12Z")

</div>

Usually when I want underlining in a label, I resort to using the HTML tag `<U>`, however I can’t do that for the numeric text field. Is there another way I can do this?

---

<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:** [May 4, 2020, 8:56am UTC](https://forum.inductiveautomation.com/t/vision-numeric-text-field-underlined-text/34396/2 "2020-05-04T08:56:32Z")

</div>

Got it:

```auto
if event.propertyName in ('componentRunning'):
	from java.util import HashMap
	from java.awt.font import TextAttribute
	
	fontAttributes = HashMap()
	fontAttributes.put(TextAttribute.UNDERLINE, TextAttribute.UNDERLINE_ON)
	
	obj = event.source
	obj.setFont(obj.getFont().deriveFont(fontAttributes))

```

Edit: worth noting that to turn it off, there’s no corresponding “UNDERLINE\_OFF”. Simply set it to -1.
