The scroll speed was really slow on my template repeater. After a bit of searching through the Ignition Forums, I found some helpful posts and comments that led me to implement the code shown below when the template repeater is loaded.
My issue is that I can only use the mouse-wheel to scroll vertically when the mouse-pointer where the scroll-bar is located. I would like to be able to scroll when the mouse is inside anywhere in the template repeater (the green box in my image). How do I make that happen?
if (event.source == "componentRunning"):
from javax.swing import SwingUtilities
from javax.swing import JScrollPane
scrollPane = SwingUtilities.getAncestorOfClass(JScrollPane, event.source.getComponents()[1].getComponents()[2])
scrollPane.getVerticalScrollBar().setUnitIncrement(50)
I’m not sure why it isn’t scrolling when the pointer is outside of the scroll bar, but I don’t think your propertyChange script is right. You’re checking if event.source == ‘componentRunning’ - should be event.propertyName == ‘componentRunning’.
Hi @ethomason - I think I marked this as a solution prematurely. I can tell that this code is working somewhat because my scrolling increments change successfully. But for any scrolling to occur at all, I have to place my mouse pointer exacly on the scrollbar. I’d like to be able to scroll when my mouse is anywhere on the template repeater.
I don’t have tooltip, but I do have a script that runs on mouseEntered for some text inside each template instance. In the photo above, I have mouseEntered text on Hand Add and Saute.