2021-02-26, 16:07
Hello,
I am new to making addons for kodi, and i have ran into some issues and i need some help.
I have a script addon that creates a custom dialog. "using (xbmcgui.WindowXML)"
In my dialog xml file i have a button that has <ondown>5009</ondown>, and i have a list control with id 5009.
When the button has the focus and i press down, why does not the list control get the focus?
So, that pressing up & down changes item in the list.
i have tried in my script to force the focus on the list control using both setFocus and setFocusId, but none gives the list control focus.
What am i doing wrong and what is the solution to my problem ?
I am new to making addons for kodi, and i have ran into some issues and i need some help.
I have a script addon that creates a custom dialog. "using (xbmcgui.WindowXML)"
In my dialog xml file i have a button that has <ondown>5009</ondown>, and i have a list control with id 5009.
When the button has the focus and i press down, why does not the list control get the focus?
So, that pressing up & down changes item in the list.
xml:
<?xml version="1.0" encoding="UTF-8"?>
<window type="dialog" id=4999>
<views>5001,5002,5003,5004,5005,5006,5007,5008,5009,5010,5011,5012,5013,5014,5015,5016,5017,5018</views>
...
...
<controls>
<include>CommonBackground</include>
<onup></onup>
<ondown></ondown>
<onleft></onleft>
<onright></onright>
...
...
<control type="button" id=5005>
...
...
<visible>true</visible>
<onclick></onclick>
<onup></onup>
<ondown>5009</ondown>
<onleft></onleft>
<onright></onright>
...
...
</control>
...
...
<control type="list" id=5009>
...
...
<viewtype label="list">list</viewtype>
<visible>true</visible>
<pagecontrol>5010</pagecontrol>
<onup></onup>
<ondown></ondown>
<onleft></onleft>
<onright></onright>
<itemlayout>
...
...
</itemlayout>
<focusedlayout>
...
...
</focusedlayout>
</control>
...
...
</controls>
</window>
i have tried in my script to force the focus on the list control using both setFocus and setFocusId, but none gives the list control focus.
What am i doing wrong and what is the solution to my problem ?