# Power Table Auto Column Size

**URL:** <https://forum.inductiveautomation.com/t/power-table-auto-column-size/15151>\
**Category:** Ignition\
**Tags:** ignition78, scripting\
**Created:** [August 24, 2017, 12:57am UTC](https://forum.inductiveautomation.com/t/power-table-auto-column-size/15151 "2017-08-24T00:57:14Z")\
**Posts on this page:** 1\
**Showing post:** 2

<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:** [August 25, 2017, 12:02am UTC](https://forum.inductiveautomation.com/t/power-table-auto-column-size/15151/2 "2017-08-25T00:02:09Z")

</div>

```python
from com.jidesoft.grid import TableUtils
from javax.swing import JTable
table = event.source.parent.getComponent('Power Table').getTable()

table.setAutoResizeMode(JTable.AUTO_RESIZE_OFF)
TableUtils.autoResizeAllColumns(table)

```

First, third, and last lines are most important.

---

_[View the full topic](https://forum.inductiveautomation.com/t/power-table-auto-column-size/15151)._
