2014-09-01, 18:54
Hi!
I created a window called custom_quiz.xml that have the following button:
In my python file, how can I detect if the button was clicked?
I didn't find one method to verify this.
I created a window called custom_quiz.xml that have the following button:
Code:
<control type="button" id="3000">
<description>Back Button</description>
<posx>204</posx>
<posy>626</posy>
<width>23</width>
<height>30</height>
<onclick>ActivateWindow(4444)</onclick>
<texturefocus>BTVoltar.png</texturefocus>
<texturenofocus>BTVoltar.png</texturenofocus>
<onup>51</onup>
<onright>51</onright>
</control>
In my python file, how can I detect if the button was clicked?
Code:
def onClick(self, controlID):
try:
goback = self.getControl(3000)
xbmc.log("{0}".format(goback.getPosition()))
# code here
except Exception, e:
xbmc.log("{0}".format(e))
I didn't find one method to verify this.