# Template Repeater Scrollbar Policy Question

**URL:** <https://forum.inductiveautomation.com/t/template-repeater-scrollbar-policy-question/9776>\
**Category:** General Discussion\
**Created:** [March 4, 2015, 4:37pm UTC](https://forum.inductiveautomation.com/t/template-repeater-scrollbar-policy-question/9776 "2015-03-04T16:37:22Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![dansadowski](https://avatars.discourse-cdn.com/v4/letter/d/d6d6ee/32.png) [@dansadowski](https://forum.inductiveautomation.com/u/dansadowski)\
**Post date:** [March 4, 2015, 4:37pm UTC](https://forum.inductiveautomation.com/t/template-repeater-scrollbar-policy-question/9776/1 "2015-03-04T16:37:22Z")

</div>

Is there any way to control the template repeater’s scroll bar policy? I am having some issues with the layout of a particular page when the template repeater turns its scrollbars (when content goes off the page). Unfortunately, the repeater puts the scrollbar on the inside of the container causing all of the interior content to be shrunk by the size of the scrollbar. (See the screenshot). Is there a way to either force the scrollbars to always be on, or leave a space inside the repeater that the scrollbar can open into?

Thanks,  
Dan  
 ![](https://us1.discourse-cdn.com/inductiveautomation/original/2X/6/610be5022064112cec07e5d50298d3b709eb29a2.PNG)  
  
 ![](https://us1.discourse-cdn.com/inductiveautomation/original/2X/7/725a1731181cb7f523e336d014cd30a120a68de1.PNG)

---

<div class="post-metadata">

**Author:** ![nmudge](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/nmudge/32/3394_2.png) [@nmudge](https://forum.inductiveautomation.com/u/nmudge)\
**Post date:** [March 4, 2015, 5:48pm UTC](https://forum.inductiveautomation.com/t/template-repeater-scrollbar-policy-question/9776/2 "2015-03-04T17:48:05Z")

</div>

Hi Dan,

You can make the vertical scroll bar always appear in the template repeater by adding the following Python script to the template repeater’s propertyChange event handler:

```auto
if event.propertyName == "componentRunning":
	from javax.swing import ScrollPaneConstants
	repeater = event.source
	jscrollPane = repeater.getComponents()[1]
	jscrollPane.setVerticalScrollBarPolicy(ScrollPaneConstants.VERTICAL_SCROLLBAR_ALWAYS)
```

Best,

---

<div class="post-metadata">

**Author:** ![dansadowski](https://avatars.discourse-cdn.com/v4/letter/d/d6d6ee/32.png) [@dansadowski](https://forum.inductiveautomation.com/u/dansadowski)\
**Post date:** [March 5, 2015, 6:19pm UTC](https://forum.inductiveautomation.com/t/template-repeater-scrollbar-policy-question/9776/3 "2015-03-05T18:19:10Z")

</div>

Thanks, that works like a champ. I wonder if there’s a way to hide the scrollbar, yet still keep that space.  
 ![](https://us1.discourse-cdn.com/inductiveautomation/original/2X/e/e1d18bad5c8e4ef637676259999e0ea0a7a7b3ad.PNG)
