2014-10-19, 00:58
I want to set the image in the button control when I get the control id.
I use the following code:
In my window xml file i have a button control with id="4127":
i want to know how do you check if I have the image that are valid in the button control before i can change the image using python?
I use the following code:
Code:
button1_yellow = self.getControl(4127)
In my window xml file i have a button control with id="4127":
Code:
<control type="button" id="4127">
<description>Channel Button 1</description>
<posx>0</posx>
<posy>222</posy>
<width>350</width>
<height>34</height>
<visible>true</visible>
<texturefocus>changelang_yellow.png</texturefocus>
<texturenofocus>channels_bar1.png</texturenofocus>
<label></label>
<font>Font_Bold25</font>
<textcolor>0xFF000000</textcolor>
<disabledcolor>0xFFFFFFFF</disabledcolor>
<align>left</align>
<aligny>center</aligny>
<pulseonselect></pulseonselect>
<onclick></onclick>
<onfocus>-</onfocus>
<onup>2</onup>
<ondown>3</ondown>
<onleft>1</onleft>
<onright>1</onright>
</control>
i want to know how do you check if I have the image that are valid in the button control before i can change the image using python?