# Resize power table without resizing rows

**URL:** <https://forum.inductiveautomation.com/t/resize-power-table-without-resizing-rows/39278>\
**Category:** Ignition\
**Tags:** vision, scripting\
**Created:** [October 1, 2020, 6:00pm UTC](https://forum.inductiveautomation.com/t/resize-power-table-without-resizing-rows/39278 "2020-10-01T18:00:46Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Dan\_Bridgeman](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/dan_bridgeman/32/3610_2.png) [@Dan\_Bridgeman](https://forum.inductiveautomation.com/u/Dan_Bridgeman)\
**Post date:** [October 1, 2020, 6:00pm UTC](https://forum.inductiveautomation.com/t/resize-power-table-without-resizing-rows/39278/1 "2020-10-01T18:00:46Z")

</div>

I would like to resize a power table with a script so it only takes up the bottom half of its current space on the screen, leaving room to make other components visible in the newly available space. I’ve tried it using system.gui.transform, but I have found that when I change the height of the table, it shrinks the text of the rows as well. So I go from this

 ![before](https://us1.discourse-cdn.com/inductiveautomation/original/3X/5/f/5f7dff6ca10e3e44b0fa9508e4d1f15f395a316c.png)

to this

![after](https://us1.discourse-cdn.com/inductiveautomation/original/3X/d/e/de321dc578fdbb0b03c702272d2b9ab128f06788.png)

The rows appear to be the same height, it’s just the text that has shrunk. I had hoped I could just reset the font after the transform finished, but it’s 12pt Dialog, Plain before and after.

Is this a bug, or is there another step I should be taking here?

---

<div class="post-metadata">

**Author:** ![Dan\_Bridgeman](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/dan_bridgeman/32/3610_2.png) [@Dan\_Bridgeman](https://forum.inductiveautomation.com/u/Dan_Bridgeman)\
**Post date:** [October 1, 2020, 6:19pm UTC](https://forum.inductiveautomation.com/t/resize-power-table-without-resizing-rows/39278/2 "2020-10-01T18:19:22Z")

</div>

Here’s the script I’m using for this

```auto
ptHeaders = event.source.parent.getComponent('ptOrderHeaders')

oldY = ptHeaders.y
oldHeight = ptHeaders.height
verticalShift = oldHeight/2

system.gui.transform(ptHeaders, newY=oldY+verticalShift, newHeight=oldHeight-verticalShift)

```

---

<div class="post-metadata">

**Author:** ![Dan\_Bridgeman](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/dan_bridgeman/32/3610_2.png) [@Dan\_Bridgeman](https://forum.inductiveautomation.com/u/Dan_Bridgeman)\
**Post date:** [October 2, 2020, 6:48pm UTC](https://forum.inductiveautomation.com/t/resize-power-table-without-resizing-rows/39278/3 "2020-10-02T18:48:12Z")

</div>

Another piece of the puzzle: when I do this in the designer, it does not shrink the text of the rows. It only happens when I transform the power table in a launched vision client.

---

<div class="post-metadata">

**Author:** ![Dan\_Bridgeman](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/dan_bridgeman/32/3610_2.png) [@Dan\_Bridgeman](https://forum.inductiveautomation.com/u/Dan_Bridgeman)\
**Post date:** [October 8, 2020, 3:31pm UTC](https://forum.inductiveautomation.com/t/resize-power-table-without-resizing-rows/39278/4 "2020-10-08T15:31:03Z")

</div>

Just in case anyone else ever runs into this, I did figure out the problem. The Power Table had its Auto Row Height property set to true. As soon as I set it to False (and set the actual Row Height property to be the same height as when auto-sized) it worked as I would have expected, with the rows all staying the same height while the table itself shrank.

This does lead me to another question: when a table’s rows are auto-sized, is there a scripting function which would tell me what height it had set the rows to?
