# Power Table header height

**URL:** <https://forum.inductiveautomation.com/t/power-table-header-height/12796>\
**Category:** General Discussion\
**Created:** [March 15, 2017, 10:10pm UTC](https://forum.inductiveautomation.com/t/power-table-header-height/12796 "2017-03-15T22:10:22Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![JGJohnson](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/jgjohnson/32/29582_2.png) [@JGJohnson](https://forum.inductiveautomation.com/u/JGJohnson)\
**Post date:** [March 15, 2017, 10:10pm UTC](https://forum.inductiveautomation.com/t/power-table-header-height/12796/1 "2017-03-15T22:10:22Z")

</div>

Does anybody know how to control the header height for a power table?

I know I can add html line breaks to the column name but there has to be another way given how configurable the component is.

In version 7.7.5 the header height was already good with padding at the top and bottom but we have switched over to 7.8.4 and headers are now sandwiched between the top and bottom borders of the header.

![](https://us1.discourse-cdn.com/inductiveautomation/original/2X/e/ee15a6f517224cd792a39e6e697ee7ebfc823941.png)

![](https://us1.discourse-cdn.com/inductiveautomation/original/2X/0/0fed1df8b1821ac21e063046acfe5a71181acb65.png)

---

<div class="post-metadata">

**Author:** ![nmudge](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/nmudge/32/3394_2.png) [@nmudge](https://forum.inductiveautomation.com/u/nmudge)\
**Post date:** [March 15, 2017, 11:00pm UTC](https://forum.inductiveautomation.com/t/power-table-header-height/12796/2 "2017-03-15T23:00:19Z")

</div>

Nick Mudge comes to the rescue.

Put this code in the initialize extension function of the Power Table:

`from java.awt import Dimension	
table = self.getTable()
header = table.getTableHeader()
dim = header.getPreferredSize()
header.setPreferredSize(Dimension(int(dim.getWidth()), 300))
header.revalidate()`That code sets the height of the header to 300. You can change that value. You won’t see the change until after you save the window, close it and open it again. Because the initialize extension function executes when a window is opened.

Best,

---

<div class="post-metadata">

**Author:** ![JGJohnson](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/jgjohnson/32/29582_2.png) [@JGJohnson](https://forum.inductiveautomation.com/u/JGJohnson)\
**Post date:** [March 16, 2017, 12:46pm UTC](https://forum.inductiveautomation.com/t/power-table-header-height/12796/3 "2017-03-16T12:46:59Z")

</div>

> [@nmudge](#):
>
> Nick Mudge comes to the rescue.

![:mrgreen:](https://us1.discourse-cdn.com/inductiveautomation/original/1X/d23659b203d2d24d394be983a52adb2fa6fe23d4.gif "Mr. Green")

Nalied it! Thanks Nick.

---

<div class="post-metadata">

**Author:** ![JordanCClark](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/jordancclark/32/83362_2.png) [@JordanCClark](https://forum.inductiveautomation.com/u/JordanCClark)\
**Post date:** [March 16, 2017, 3:32pm UTC](https://forum.inductiveautomation.com/t/power-table-header-height/12796/4 "2017-03-16T15:32:49Z")

</div>

Not my best work, but there it is…  
 ![](https://us1.discourse-cdn.com/inductiveautomation/original/2X/b/bf4c415f03ed9485ee4d35da444150958fb64749.png)

---

<div class="post-metadata">

**Author:** ![nmudge](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/nmudge/32/3394_2.png) [@nmudge](https://forum.inductiveautomation.com/u/nmudge)\
**Post date:** [March 16, 2017, 4:04pm UTC](https://forum.inductiveautomation.com/t/power-table-header-height/12796/5 "2017-03-16T16:04:48Z")

</div>

Haha! That is too funny!
