Posts: 12
Joined: Feb 2010
Reputation:
0
Is it possible to use the ActivateWindow() command to reference a specific item in a list.
ie. i'm using a list based off the favourites menu which contains, say, 5 entries.
I've a custom button to activate said list but would like to be able to have the button open the list to item 3 on the list.
The wiki entry container item layout seems to indicate you can reference specific rows, columns and positions in a list for animation means.
Does ActivateWindow() support similar? Is there a command that would allow me to activate the favourites window and move to item 3 on the list?
Posts: 12
Joined: Feb 2010
Reputation:
0
Great! Thanks! Works almost a treat and is a method I would not have thought to try.
Following your steps, I can get the invisible trigger to work to move the list focus 2 items down.
However, two issues are occuring.
1) When using the invisible trigger button, the <onfocus>Control.Move(id,2)</onfocus> works to set the item in the list 2 places down, but focus isn't returned to the list itself. So no entry is actually highlighted on the list. This isn't a deal breaker, as the first cursor movement does highlight the list entry, but would be nice to fix.
2) the list remembers last position, so exiting and entering the window will cause an increment of 2 from the last position, rather than from the first entry. This results in the position moving down thru the entire list if you exit/enter repeatedly.
I know there is a flag to turn off remember last position, but can't find it. Any idea what this is?
Here's the code snippets i've added in for this into the custom.xml file, in case i've missed something.
<window type="dialog" id="1">
<defaultcontrol always="true">10</defaultcontrol>
<control type="button" id="10">
<onfocus>Control.Move(11,2)</onfocus>
<texturenofocus>-</texturenofocus>
<texturefocus>-</texturefocus>
<onleft>11</onleft>
<onright>11</onright>
<onup>11</onup>
<ondown>11</ondown>
</control>
note: the list is question is id=11
Posts: 3,660
Joined: Feb 2008
Reputation:
93
Jeroen
Team-Kodi Member
Posts: 3,660
Ok, using the same method for the most part but instead of using Control.Move(id,position) you could try using Control.SetFocus(id,position)
I think that would take care of both issues. Although I'm not completely sure about the second one.