# 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:** 1\
**Showing post:** 2

<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)

---

_[View the full topic](https://forum.inductiveautomation.com/t/alarm-journal-component-scrollbar-size/114573)._
