# Scrool bar size

**URL:** <https://forum.inductiveautomation.com/t/scrool-bar-size/12358>\
**Category:** Ignition\
**Created:** [November 14, 2016, 10:16pm UTC](https://forum.inductiveautomation.com/t/scrool-bar-size/12358 "2016-11-14T22:16:56Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![bwagner](https://avatars.discourse-cdn.com/v4/letter/b/7feea3/32.png) [@bwagner](https://forum.inductiveautomation.com/u/bwagner)\
**Post date:** [November 14, 2016, 10:16pm UTC](https://forum.inductiveautomation.com/t/scrool-bar-size/12358/1 "2016-11-14T22:16:56Z")

</div>

Is there a way to change the size of the scroll bar to make it more touch friendly?

---

<div class="post-metadata">

**Author:** ![TedNewman](https://avatars.discourse-cdn.com/v4/letter/t/85e7bf/32.png) [@TedNewman](https://forum.inductiveautomation.com/u/TedNewman)\
**Post date:** [November 14, 2016, 10:24pm UTC](https://forum.inductiveautomation.com/t/scrool-bar-size/12358/2 "2016-11-14T22:24:22Z")

</div>

Call this script on the component to set its scrollbars. You may want to call the script in the window’s [tt]visionWindowOpened[/tt] event or something similar.

```auto
component = event.source #Make this the component you need to change the scrollbars for
scrollbarThickness = 20 #Change this to be the size you want

from java.awt import Dimension
jScrollPane = component.getViewport().getParent()
jScrollPane.getVerticalScrollBar().setPreferredSize(Dimension(scrollbarThickness, 0));
jScrollPane.getHorizontalScrollBar().setPreferredSize(Dimension(0, scrollbarThickness));
```

---

<div class="post-metadata">

**Author:** ![bwagner](https://avatars.discourse-cdn.com/v4/letter/b/7feea3/32.png) [@bwagner](https://forum.inductiveautomation.com/u/bwagner)\
**Post date:** [November 15, 2016, 2:06pm UTC](https://forum.inductiveautomation.com/t/scrool-bar-size/12358/3 "2016-11-15T14:06:47Z")

</div>

Below is what I have in the script for ‘visionWindowOpened’

component = event.source(‘schedDataTable’)  
scrollbarThickness = 100  
from java.awt import Dimension  
jScrollPane = component.getViewport().getParent()  
jScrollPane.getVerticleScrollBar().setPreferedSize(Dimension(scrollbarThickness, 0));  
jScrollPane.getHorizontalScrollBar().setPreferredSize(Dimension(0, scrollbarThickness));

And I am getting the below error.

[color=#BF0000]Traceback (most recent call last):  
File “event:visionWindowOpened”, line 1, in   
TypeError: ‘com.inductiveautomation.factorypmi.application.FPMIWindow’ object is not callable[/color]

---

<div class="post-metadata">

**Author:** ![TedNewman](https://avatars.discourse-cdn.com/v4/letter/t/85e7bf/32.png) [@TedNewman](https://forum.inductiveautomation.com/u/TedNewman)\
**Post date:** [November 15, 2016, 10:09pm UTC](https://forum.inductiveautomation.com/t/scrool-bar-size/12358/4 "2016-11-15T22:09:46Z")

</div>

you want [tt]event.source.getRootContainer().getComponent(‘schedDataTable’)[/tt] on your first line. If the schedDataTable component is inside other containers, you’ll want to add the proper .getComponent() calls in the middle to navigate to it.

---

<div class="post-metadata">

**Author:** ![nick.schuetz](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/nick.schuetz/32/6160_2.png) [@nick.schuetz](https://forum.inductiveautomation.com/u/nick.schuetz)\
**Post date:** [November 18, 2016, 3:56am UTC](https://forum.inductiveautomation.com/t/scrool-bar-size/12358/5 "2016-11-18T03:56:15Z")

</div>

It looks like if you change the scroll bar width in the Project Properties, it will change the scroll bar width for all components. FYI I am using 7.9
