2010-08-24, 10:19
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:
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
but when i click on the radiobutton he dosent chagne state!!!!
anyone know what is the problem??
Thank you
ofer
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++)
{
$content=($content.'<control type="grouplist" id="900">
<visible>Container(9000).Hasfocus('.$i.')</visible>
<posx>290</posx>
<posy>60</posy>
<width>750</width>
<height>530</height>
<itemgap>-1</itemgap>
<pagecontrol>-</pagecontrol>
<onleft>9000</onleft>
<onright>9000</onright>
<onup>9001</onup>
<ondown>9001</ondown>');
for($j=0;$j<sizeof($elem[$i]);$j++)
{
$content=($content.'<control type="radiobutton" id='.$k.'>
<width>750</width>
<height>40</height>
<font>font13</font>
<label>'.$elem[$i][$j]['name'].'</label>
<textcolor>grey2</textcolor>
<focusedcolor>white</focusedcolor>
<texturefocus>MenuItemFO.png</texturefocus>
<texturenofocus>MenuItemNF.png</texturenofocus>
<selected>'.$elem[$i][$j]['status'].'</selected>
</control>');
$k++;
}
$content=($content.'</control>');
}
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):
def onClick(self, id):
self.getControl( id ).setSelected(False)
def openroom(id):
req=urllib2.Request('http://localhost/xbmc/GetElements.php?roomid='+id)
response=urllib2.urlopen(req)
ui = openRoomWindow('filename.xml', os.getcwd())
ui.doModal()
anyone know what is the problem??
Thank you
ofer