How to automatically scroll to the first item of a directory on load
#1
When a directory gets loaded, I want to force the scrollbar to first item on the list. I'm not sure what the exact default behavior is, but sometimes the scrolling end up in the middle, or the end of the list.

I thought listitem.select(False) would do the trick, but no luck.

Can anyone help me out?
Reply
#2
Hi,
by default, the last selected item is selected when entering a directory. In most cases, this makes sense.
If you want to force xbmc to select the first item, try this:
Code:
wnd = xbmcgui.Window(xbmcgui.getCurrentWindowId())
wnd.getControl(wnd.getFocusId()).selectItem(1)
Reply

Logout Mark Read Team Forum Stats Members Help
How to automatically scroll to the first item of a directory on load0