# Change width of Table scroll bars

**URL:** <https://forum.inductiveautomation.com/t/change-width-of-table-scroll-bars/4979>\
**Category:** Ignition\
**Created:** [August 10, 2012, 7:10pm UTC](https://forum.inductiveautomation.com/t/change-width-of-table-scroll-bars/4979 "2012-08-10T19:10:47Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![cgele](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/cgele/32/3453_2.png) [@cgele](https://forum.inductiveautomation.com/u/cgele)\
**Post date:** [August 10, 2012, 7:10pm UTC](https://forum.inductiveautomation.com/t/change-width-of-table-scroll-bars/4979/1 "2012-08-10T19:10:47Z")

</div>

Is there any way to change the width of the scroll bars on a Table Component? I would like to use the table in a mobile app, but I have fat fingers and it is difficult to navigate the table.

Thanks.

---

<div class="post-metadata">

**Author:** ![James.Lorenz](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/james.lorenz/32/3290_2.png) [@James.Lorenz](https://forum.inductiveautomation.com/u/James.Lorenz)\
**Post date:** [August 10, 2012, 8:07pm UTC](https://forum.inductiveautomation.com/t/change-width-of-table-scroll-bars/4979/2 "2012-08-10T20:07:21Z")

</div>

You can use getVerticalScrollBar() and setPreferredSize() from Java’s ScrollPaneLayout, which is from Java Swing (which Ignition uses). An example:

[code]from java.awt import Dimension  
from java.lang import Integer

# create Dimension object, first parameter is width of scrollbar

new\_scrollbar\_width = Dimension(25, Integer.MAX\_VALUE)

# get component object, pass the Dimension object to setPreferredSize to change width

comp = system.gui.getWindow(‘WindowName’).getRootContainer().getComponent(“Table”)  
comp.getVerticalScrollBar().setPreferredSize(new\_scrollbar\_width)

# a hacky way of “repainting” the component, since repaint() won’t work.

# manually resizing the component in the designer using the arrows would work as well

system.gui.resizeComponent(comp,comp.getWidth()+1,comp.getHeight()+1)  
system.gui.resizeComponent(comp,comp.getWidth()-1,comp.getHeight()-1)[/code]

---

<div class="post-metadata">

**Author:** ![tailfire](https://avatars.discourse-cdn.com/v4/letter/t/b5a626/32.png) [@tailfire](https://forum.inductiveautomation.com/u/tailfire)\
**Post date:** [August 12, 2012, 3:52am UTC](https://forum.inductiveautomation.com/t/change-width-of-table-scroll-bars/4979/3 "2012-08-12T03:52:16Z")

</div>

Would this code be put on the component somewhere? Where does it need added?  
I also have a similar need to increase the size of the scroll bar.  
Its not on mobile but same principle.

---

<div class="post-metadata">

**Author:** ![James.Lorenz](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/james.lorenz/32/3290_2.png) [@James.Lorenz](https://forum.inductiveautomation.com/u/James.Lorenz)\
**Post date:** [August 13, 2012, 3:19pm UTC](https://forum.inductiveautomation.com/t/change-width-of-table-scroll-bars/4979/4 "2012-08-13T15:19:10Z")

</div>

It just depends on when or how often you want to change the scrollbar width. If you’re just making a static change to the scrollbar width in the designer, you can go to Tools -\> Script Playground and put the script in there. If you want a user to change the width while using the client, you can use a button/pop-up window to prompt the user to change the value, or use a numeric text field. If you need it to dynamically change at a certain time or when a tag changes, you can use a gateway startup script. There are many different implementations that can be applied.

---

<div class="post-metadata">

**Author:** ![eduardo.ojalvo](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/eduardo.ojalvo/32/14356_2.png) [@eduardo.ojalvo](https://forum.inductiveautomation.com/u/eduardo.ojalvo)\
**Post date:** [October 3, 2019, 1:18pm UTC](https://forum.inductiveautomation.com/t/change-width-of-table-scroll-bars/4979/5 "2019-10-03T13:18:13Z")

</div>

Hello,

May i do it to an easychart component? To the verticalscrollbar from the tagpens?

Thank you.

---

<div class="post-metadata">

**Author:** ![dkhayes117](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/dkhayes117/32/68344_2.png) [@dkhayes117](https://forum.inductiveautomation.com/u/dkhayes117)\
**Post date:** [October 3, 2019, 2:10pm UTC](https://forum.inductiveautomation.com/t/change-width-of-table-scroll-bars/4979/6 "2019-10-03T14:10:07Z")

</div>

If this is a touchscreen application, you can make all the scroll bars larger in a project by going to project-\>Properties-\>Client-\>General-\>Touch Screen Mode Enabled-\>Scrollbar Width

---

<div class="post-metadata">

**Author:** ![eduardo.ojalvo](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/eduardo.ojalvo/32/14356_2.png) [@eduardo.ojalvo](https://forum.inductiveautomation.com/u/eduardo.ojalvo)\
**Post date:** [October 3, 2019, 2:18pm UTC](https://forum.inductiveautomation.com/t/change-width-of-table-scroll-bars/4979/7 "2019-10-03T14:18:46Z")

</div>

Exactly, it´s for a touch screen application.

Thank you very much.
