# Changing Table Font Size via Script

**URL:** <https://forum.inductiveautomation.com/t/changing-table-font-size-via-script/12094>\
**Category:** Ignition\
**Created:** [September 1, 2016, 4:38pm UTC](https://forum.inductiveautomation.com/t/changing-table-font-size-via-script/12094 "2016-09-01T16:38:01Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![mpeasley](https://avatars.discourse-cdn.com/v4/letter/m/3bc359/32.png) [@mpeasley](https://forum.inductiveautomation.com/u/mpeasley)\
**Post date:** [September 1, 2016, 4:38pm UTC](https://forum.inductiveautomation.com/t/changing-table-font-size-via-script/12094/1 "2016-09-01T16:38:01Z")

</div>

All,

I am trying to change the font size inside a table based on a script. Is this possible? I get the error that it is a read only attribute, but I thought there was a way to change fonts in a table.

Thanks

---

<div class="post-metadata">

**Author:** ![KathyApplebaum](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/kathyapplebaum/32/7261_2.png) [@KathyApplebaum](https://forum.inductiveautomation.com/u/KathyApplebaum)\
**Post date:** [September 1, 2016, 6:42pm UTC](https://forum.inductiveautomation.com/t/changing-table-font-size-via-script/12094/2 "2016-09-01T18:42:27Z")

</div>

That’s odd… setFont() and setHeaderFont() are public for both the regular table and the power table.

---

<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:** [September 1, 2016, 11:23pm UTC](https://forum.inductiveautomation.com/t/changing-table-font-size-via-script/12094/3 "2016-09-01T23:23:14Z")

</div>

Both of the following worked for me:

`table = event.source.parent.getComponent('Table')
table.font = table.font.deriveFont(16.0)`

`from java.awt import Font
table = event.source.parent.getComponent('Table')
table.font = Font('Dialog', 0, 12)`

I was putting the code into a button on the same window as the table.
