# Alarm Journal Component Scrollbar Size

**URL:** <https://forum.inductiveautomation.com/t/alarm-journal-component-scrollbar-size/114573>\
**Category:** Ignition\
**Tags:** ignition81, vision\
**Created:** [March 19, 2026, 3:44pm UTC](https://forum.inductiveautomation.com/t/alarm-journal-component-scrollbar-size/114573 "2026-03-19T15:44:44Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![matt.l1](https://avatars.discourse-cdn.com/v4/letter/m/71e660/32.png) [@matt.l1](https://forum.inductiveautomation.com/u/matt.l1)\
**Post date:** [March 19, 2026, 3:44pm UTC](https://forum.inductiveautomation.com/t/alarm-journal-component-scrollbar-size/114573/1 "2026-03-19T15:44:45Z")

</div>

Looking for a way to modify the size of the scrollbar for Alarm Journal component, without touchscreen mode enabled. Was able to find a topic somewhere that spelled out how to change the size of the alarm status table via scripting, trying to achieve the same thing for the Alarm Journal table.

I can drill down into the components of the Alarm Journal table but I’m not exactly sure how to implement the methods to modify them as I’m not very Java savvy.

---

<div class="post-metadata">

**Author:** ![justinedwards.jle](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/justinedwards.jle/32/37854_2.png) [@justinedwards.jle](https://forum.inductiveautomation.com/u/justinedwards.jle)\
**Post date:** [March 26, 2026, 9:17am UTC](https://forum.inductiveautomation.com/t/alarm-journal-component-scrollbar-size/114573/2 "2026-03-26T09:17:34Z")

</div>

> [@matt.l1](#):
>
> find a topic somewhere that spelled out how to change the size of the alarm status table via scripting

I remember [that one](https://forum.inductiveautomation.com/t/alarm-status-table-scrollbar-width-and-return-to-top-in-marquee-mode-vision/67653/2). Rather than developing individual scripts for every component in Vision, I imagine it would be better to simply make a generic script for modifying vertical scroll bars that will work on any given component.

Here's an example of a script that could be tossed into the project library and used for any component that requires vertical scrollbar width adjustment:

```python
# Function to set all vertical scrollbars within a given component to a given width
def setVerticalScrollbarWidths(component, width):
	
	# Check to see if the given component has a vertical scroll bar
	if hasattr(component, 'verticalScrollBar'):
		
		# Simply modify the existing preferred size using the given width and set it back to the scrollbar
		# (This could also done by importing Dimension at top level and creating a new one using the existing preferred height with the given width)
		verticalScrollBar = component.verticalScrollBar
		preferredSize = verticalScrollBar.getPreferredSize()
		preferredSize.width = width
		verticalScrollBar.setPreferredSize(preferredSize)
		verticalScrollBar.revalidate() # Has to be done to make the change visibly take effect instantly
	
	# Recursively pass all subcomponents back into the function to check them for vertical scroll bars
	for subComponent in component.components:
		setVerticalScrollbarWidths(subComponent, width)

```

If the function were added to library script called components:

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/1/8/184eea1cfb72c8e46a6ed43c4cc744d10d43dc27.png)

...then it could be called during the journal table's initialization from the journal table's propertyChange event handler in this way:

```python
# Runs only once at initialization
# Will NOT run in the designer UNLESS preview mode is started prior to opening the window
if event.propertyName == 'componentRunning' and event.newValue:
	
	# Set the width in pixels of the vertical scrollbars at initialization
	component = event.source
	width = 40
	scriptLibrary.components.setVerticalScrollbarWidths(component, width)

```

**Result:**  
 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/a/5/a5d3f4c8bcb8b6cef4de6fce5002ebc9357e84d9.png)

---

<div class="post-metadata">

**Author:** ![pturmel](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pturmel/32/3295_2.png) [@pturmel](https://forum.inductiveautomation.com/u/pturmel)\
**Post date:** [March 26, 2026, 12:43pm UTC](https://forum.inductiveautomation.com/t/alarm-journal-component-scrollbar-size/114573/3 "2026-03-26T12:43:50Z")

</div>

> [@justinedwards.jle](#):
>
> propertyChange event

To make this work in the designer without requiring opening in preview mode, I tend to place such initialization on an integer custom property expression binding, like so:

```python
objectScript("scriptLibrary.components.setVerticalScrollbarWidths(binding.target, 40)")

```

And I alter the function to return a random integer so you can see it working.

(If you cannot use my Integration Toolkit's `objectScript()`, you can also put the above in a component custom method, and call `runScript()` on it instead.)

---

<div class="post-metadata">

**Author:** ![justinedwards.jle](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/justinedwards.jle/32/37854_2.png) [@justinedwards.jle](https://forum.inductiveautomation.com/u/justinedwards.jle)\
**Post date:** [March 26, 2026, 2:08pm UTC](https://forum.inductiveautomation.com/t/alarm-journal-component-scrollbar-size/114573/4 "2026-03-26T14:08:31Z")

</div>

> [@pturmel](#):
>
> without requiring opening in preview mode,

An expression binding on a boolean property using the systemFlags client tag can also be used for things that are lost when preview mode is stopped. I use this binding on the visibility property of overlays to keep them out of the way while I'm designing.

---

<div class="post-metadata">

**Author:** ![matt.l1](https://avatars.discourse-cdn.com/v4/letter/m/71e660/32.png) [@matt.l1](https://forum.inductiveautomation.com/u/matt.l1)\
**Post date:** [March 26, 2026, 2:24pm UTC](https://forum.inductiveautomation.com/t/alarm-journal-component-scrollbar-size/114573/5 "2026-03-26T14:24:00Z")

</div>

This worked perfectly, makes me feel silly how easy you made this look. Much easier than trying to figure out how to drill into the components 1 by 1.

Thank you a bunch, made my life a lot easier. I’ve seen pturmel up and down these forums but not you. Appreciate both of your contributions on these forums, a lot of questions I’ve had were already asked and solved by smarter individuals on these forums including you two.
