# Vertical text truncated

**URL:** <https://forum.inductiveautomation.com/t/vertical-text-truncated/7945>\
**Category:** Ignition\
**Created:** [February 3, 2014, 4:51pm UTC](https://forum.inductiveautomation.com/t/vertical-text-truncated/7945 "2014-02-03T16:51:08Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![Carl.Gould](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/carl.gould/32/7262_2.png) [@Carl.Gould](https://forum.inductiveautomation.com/u/Carl.Gould)\
**Post date:** [February 3, 2014, 5:23pm UTC](https://forum.inductiveautomation.com/t/vertical-text-truncated/7945/2 "2014-02-03T17:23:52Z")

</div>

Yes, this is a long-standing problem with the label that has to do with something deep in Swing that we’re stuck with.

As a workaround, you could use the paintable canvas to make your own vertical label if you wanted to. Simple create a paintable canvas, put a custom property called “text” on it, and paste this into it’s paint event code:

[code]from java.lang import Math  
from java.awt import RenderingHints

g = event.graphics  
g.setRenderingHint(RenderingHints.KEY\_ANTIALIASING, RenderingHints.VALUE\_ANTIALIAS\_ON);  
fm = g.getFontMetrics()

g.setColor(event.source.background)  
g.fillRect(0,0,event.width,event.height)

stringWidth = fm.stringWidth(event.source.text)  
g.setColor(event.source.foreground)  
g.rotate(-Math.PI/2)  
g.drawString(event.source.text,-stringWidth,fm.getHeight())[/code]

---

_[View the full topic](https://forum.inductiveautomation.com/t/vertical-text-truncated/7945)._
