Kodi Community Forum

Full Version: onload?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I want set the list to the item id="5"

Why it not work?

Code:
<control type="wraplist" id="300">
            <description>Home Wraplist</description>
            <onload>Control.SetFocus(300,5)</onload>

greetz
onload only works with window xml tag: http://wiki.xbmc.org/?title=Window_Structure
thx man
... you could try <onfocus> instead.
Does it work with <onfocus> ? I'm curious because I' trying something similar (I don't have access to my laptop before a couple of days, hence my question!...).

Thks!
onfocus doesnt work with lists iirc. You would need a button in that case, but onload is better practice imo.
(2012-06-30, 19:51)Big_Noid Wrote: [ -> ]onfocus doesnt work with lists iirc. You would need a button in that case, but onload is better practice imo.

depends on what he wants to achieve. it doesn´t have the same effect.
interesting... when the greatest skinner discussing Big Grin

I want:
I turn off home-menu-buttons for example "video" or "addons" . When I open home-menu the menu-botten "movie" (<item id="5">) will be focus.

thx guys
PHP Code:
<?xml version="1.0" encoding="UTF-8"?>
<window id="0">
    <onload>Control.SetFocus(300,5)</onload> 
(2012-07-04, 21:35)Hitcher Wrote: [ -> ]
PHP Code:
<?xml version="1.0" encoding="UTF-8"?>
<window id="0">
    <onload>Control.SetFocus(300,5)</onload> 

Thank you Hitcher!
Big_Noid did point you in the right direction initially.