Hi Unfledged,
thanks for the response and sorry for my answer's delay (I was on summer holidays). I see you code and is very interesting and hard for me (I'm a newbie in scripting code).
I'm looking for a sample code based on panel container in python. I want to create custom controls and add to the panel. The controls can be different and not necessary labels and images.
My idea is extract some information from a database and show this information on the panel based on the database register type. For example, if the register is a film, I want to add an image, a label with the title and the rating. If the register is a domotic control (with Arduino), I want to add a button to control the lights and a image to show the state.
I add a to the skin the example piece of code from the wiki.
Code:
<control type="panel" id="52">
<posx>190</posx>
<posy>100</posy>
<width>485</width>
<height>425</height>
<onleft>9000</onleft>
<onright>60</onright>
<onup>52</onup>
<ondown>52</ondown>
<scrolltime tween="sine" easing="out">200</scrolltime>
<autoscroll>true</autoscroll>
<viewtype label="536">icon</viewtype>
<pagecontrol>60</pagecontrol>
<itemlayout height="141" width="120">
<control type="image">
<posx>10</posx>
<posy>10</posy>
<width>100</width>
<height>100</height>
<info>ListItem.Icon</info>
</control>
<control type="image">
<posx>80</posx>
<posy>75</posy>
<width>32</width>
<height>32</height>
<info>ListItem.Overlay</info>
</control>
<control type="label">
<posx>60</posx>
<posy>115</posy>
<width>110</width>
<height>22</height>
<font>font13</font>
<selectedcolor>green</selectedcolor>
<align>center</align>
<info>ListItem.Label</info>
</control>
</itemlayout>
<focusedlayout height="141" width="120">
<control type="image">
<width>110</width>
<height>110</height>
<posx>5</posx>
<posy>5</posy>
<texture>folder-focus.png</texture>
<animation effect="zoom" end="0,0,120,120" time="100">focus</animation>
</control>
<control type="image">
<posx>10</posx>
<posy>10</posy>
<width>100</width>
<height>100</height>
<info>ListItem.Icon</info>
<animation effect="zoom" end="5,5,110,110" time="100">focus</animation>
</control>
<control type="image">
<posx>80</posx>
<posy>75</posy>
<width>32</width>
<height>32</height>
<info>ListItem.Overlay</info>
<animation effect="slide" end="5,5" time="100">focus</animation>
</control>
<control type="label">
<posx>60</posx>
<posy>120</posy>
<width>110</width>
<height>22</height>
<font>font13</font>
<selectedcolor>green</selectedcolor>
<align>center</align>
<info>ListItem.Label</info>
</control>
</focusedlayout>
</control>
but I don't know how to control and add items from python. Is this possible? Any example is welcomed.
I try with grouplist but I can get the control from python. In the log I see "Unknown control type for python". Any ideas?
Best regards