Control.Move absolute?
#1
Is there a way to set an absolute position with Control.Move instead of an offset?

I know Control.SetFocus will take an absolute position but I don't want the control I'm moving to gain focus.
Reply
#2
Can't you follow it up with another setfocus back to the original control?
Reply
#3
(2020-07-19, 17:24)Hitcher Wrote: Can't you follow it up with another setfocus back to the original control?

No, because focusing the original control runs a script which I don't want to happen twice, once when the original control is first focused and then again when focus gets set back to it.

I ended up doing it in python by first reading the control I want to move's current position then moving negative that amount to get to the start of the control and then moving by the absolute position I need to move it to.


python:
position = int(xbmc.getInfoLabel('Container(501).CurrentItem'))  # Get absolute position of the control
    
if (position - 1) != myAbsolutePosition:
    xbmc.executebuiltin('Control.Move(501,-' + str(position-1) + ')' )  # Move backwards to the start of the control
    xbmc.executebuiltin('Control.Move(501,' + str(myAbsolutePosition) + ')')  # Now move forward to the new absolute position
Reply

Logout Mark Read Team Forum Stats Members Help
Control.Move absolute?0