Looking for the way to make a listbox scroll to what is selected. (It really should be doing this by default.)
If you are using your arrow keys within the lisbox, the scroll bars move to show what is selected. But if you use a button to set the selected Value or Index, it does not scroll up or down to show it. It selects the item, but if it’s off the viewable area, you don’t get to see it.
I’ve used some scrolling code for the power table before that works well:
from java.awt import Rectangle
table = event.source.parent.getComponent(‘MainTable’).getTable()
viewport = table.getParent()
rect = viewport.getViewRect()
newRect = Rectangle(rect.x, rect.y + 288, rect.width, rect.height)
But I need to use a Listbox for this.