[FEATURE] Fix super slow scrollbar scroll speed

v8.1.0

Been meaning to post this for a few years…
Scrollbar scroll speed in seemingly all parts of the Designer and Vision clients is really really slow (it seems like the scroll pixel amount per ‘click’ is very low, something like 1-2px).
This includes things like: Script console, drop down menus, alarm tables, tables, list components, etc. etc.

5 Likes

Only horizontally? Or vertically as well?

Both

2 Likes

Props to @nminchin for bringing up all these creature comfort requests. There are others out here noticing this stuff :wink: (even if we aren’t always requesting fixes).

2 Likes

Haha, I figured that was the case. Or perhaps I’m just really good at complaining :laughing:

1 Like

why not a bit of both :stuck_out_tongue:

1 Like

I figured everyone needs a hobby. :wink:

I’ve been running into this issue as well. Are there any plans to change the scroll speed?

Specific windows/toolbars/etc in the designer need to be fixed individually (it’s a Java Swing thing), but we are fixing things as they come up, yes.

2 Likes

Need to push the Swing a bit faster? :sunglasses:

3 Likes

Gotta be careful, what goes up must come down…

But thanks for posting about this, I’ve taken the habit of clicking and moving the slider instead of scrolling so I hardly notice it anymore, but… that would be a nice QoL improvement.

1 Like

Hi there,
I managed to change the scrollbar speed of my template repeater. This should also work for any other Vision components. I simply fire this code on the window event internalFrameOpened:

tr = system.gui.getParentWindow(event).getComponentForPath('Root Container.Template Repeater')
tr.getComponents()[1].getVerticalScrollBar().setUnitIncrement(100)

hope it helps :slight_smile:

1 Like

I actually use something similar for scrollable components, but fixing the path to the vertical scrollbar is a tiny bit prone to breaking in updates (fairly unlikely, but there’s still a chance if IA changes it up for some reason). So I find the vertical scrollbar instead in code and also set the scroll speed based on the number of items shown:

def fixScrollSpeed(scrollableObj):
	'''
	 Description:
	 Set the scroll 'speed' from extremely slow (default) to useable
	 Usage:
		if event.propertyName in ['componentRunning', 'editor']:
			shared.components.scrollable.fixScrollSpeed(event.source)
	'''
	components = scrollableObj.getComponents()
	
	# find the embedded JideScrollPane component
	for component in components:
		if str(type(component)) == "<type 'com.jidesoft.swing.JideScrollPane'>":
			scrollPane = component
	
	size = scrollPane.getSize()
	
	# set the scroll increment for the arrows to a fraction of the height of the scrollable panel
	scrollPane.getVerticalScrollBar().setUnitIncrement(size.height/4) #scroll amount for wheel and arrows
	
	# set the scroll increment when clicking on the scrollbar track piece to the height of the scrollable panel i.e. move 1 whole 'page' up/down
	scrollPane.getVerticalScrollBar().setBlockIncrement(size.height) #scroll amount clicking on scrollbar track

Unfortunately though it’s impossible* to use something like this to change the scroll speed of the components in the Designer like the script console :frowning:

*maybe it’s possible… but probably not

1 Like

Thankyou for the inspiration!
With some tweaking I got it to work for Vision template canvas also:-)

# set unit increment for the vertical scrollbar
tc = system.gui.getParentWindow(event).getComponentForPath('Root Container.TC')
verticalScrollPane = tc.getComponents()[2].getComponents()[1]
verticalScrollPane.setUnitIncrement(10)
2 Likes

Bump. This is still an issue in 8.1.31. It's so painful trying to scroll the output console...

Using the mouse wheel, this is initial view:
image

This is after scrolling a full flick of the wheel:

image

I got a whole 1.5 lines down. needless to say, it takes a LONG time to mouse wheel scroll down a long output.

Same thing with horizontal scroll. Very painful

It's easy. Run this code from the script console, and it will apply the properties from your script to every scroll bar in the designer:

def fixScrollSpeed(scrollableObj):
	for component in scrollableObj.components:
		if 'ScrollBar' in component.__class__.__name__:
			component.setUnitIncrement(component.maximum/4)
			component.setBlockIncrement(component.maximum)
		else:
			fixScrollSpeed(component)
from java.awt import Window
for window in Window.getWindows():
	fixScrollSpeed(window)
1 Like

Thank you for this!

I'll just add that 24 and 480 were pretty balanced for me. I think each line is 24px tall, and my Windows mouse properties multiply my mouse scroll by 3, so I get 3 lines in each tick of scrolling. Approximately 20x3 lines per "page" seemed fitting for the block increment too.

def fixScrollSpeed(scrollableObj):
	for component in scrollableObj.components:
		if 'ScrollBar' in component.__class__.__name__:
			component.setUnitIncrement(24)
			component.setBlockIncrement(480)
		else:
			fixScrollSpeed(component)
from java.awt import Window
for window in Window.getWindows():
	fixScrollSpeed(window)

I'm almost certain now that there's a way to do this to most Designer scrollables, but I'll have to dive into that another time...

Found another spot:
Find/Replace tool content preview areas:

1 Like