proble with radiobutton - Printable Version +- Kodi Community Forum (https://forum.kodi.tv) +-- Forum: Development (https://forum.kodi.tv/forumdisplay.php?fid=32) +--- Forum: Add-ons (https://forum.kodi.tv/forumdisplay.php?fid=26) +--- Thread: proble with radiobutton (/showthread.php?tid=79584) |
proble with radiobutton - ofer_shm - 2010-08-24 hi all i am writing a liitle script and i am having problem with setSelected() i am building a list of radiobutton with windowsxml thats is how i build the radiobutton: Code: for($i=0,$k=101;$i<sizeof($elem);$i++) as you can see i build the xml dynamic with php here the part on the script when i want to change the state of the radiobutton Code: class openRoomWindow(xbmcgui.WindowXML): anyone know what is the problem?? Thank you ofer - ofer_shm - 2010-08-24 i think i found what cause the problem but i dont know how to solve it when i remove from the xml file the tag <selected></selected> i can change the button state but i dont want to remove this tag becuse i need the button load with my defualt state any idle? thank you ofer - jmarshall - 2010-08-24 Perhaps because the internal control changes state, so you're just changing it back? - ofer_shm - 2010-08-24 No it is not the case i try to change the same button to False and True no matter what i try to button doesnt change any more idle Thank you - jmarshall - 2010-08-24 Ah - I hadn't read that you have <selected> defined. In that case it will always be on (or off - depending on what you specify). If you wish to specify a state initially, I suggest using onInit to setup the state. - ofer_shm - 2010-08-24 Thank you very much this is what i am trying to do now |