Scroll bar is slow

Template Repeater

from javax.swing import SwingUtilities
from javax.swing import JScrollPane



scrollPane = SwingUtilities.getAncestorOfClass(JScrollPane, event.source.parent.getComponent('Template Repeater').getComponents()[1].getComponents()[2])

scrollPane.getVerticalScrollBar().setUnitIncrement(30) #scroll amount for wheel and arrows
scrollPane.getVerticalScrollBar().setBlockIncrement(30) #scroll amount clicking on scrollbar itself

Template Canvas

from javax.swing import SwingUtilities
from javax.swing import JScrollPane


scrollPane = SwingUtilities.getAncestorOfClass(JScrollPane, event.source.parent.getComponent('Template Canvas').getComponents()[2].getComponents()[0])

scrollPane.getVerticalScrollBar().setUnitIncrement(30) #scroll amount for wheel and arrows
scrollPane.getVerticalScrollBar().setBlockIncrement(30) #scroll amount clicking on scrollbar itself
3 Likes