2018-01-10, 05:38
I'm a noob and have been racking my brain to achieve the following for the last 3 days and have gotten nowhere.
I'd like to create a new custom xml window that takes up the entire screen and use control type "Panel". In the panel I'd like to show thumbnail images that are dynamically learnt via a local file or via http call to local server (whichever is easier).
So far I've been able to create a custom XML with just a label and button control and open this page by activatewindow(1101) call made elsewhere. But when I change the code of this custom XML to include content type "panel", the window loads but I see nothing on the window.
Here is the custom XML I have so far. (I'm not able to get static content so far, once I get that showing, then I'll look into populating it by fetching it from the file)
I have tried a few different variations of controls under control type but none seem to show.
Your advice with some basic XML code will be much appreciated in getting me on the right track. Thanks in advance.
-------- XML file -------
<?xml version="1.0" encoding="UTF-8"?>
<window id="1101">
<defaultcontrol always="false">1234561</defaultcontrol>
<backgroundcolor>0xff00ff00</backgroundcolor>
<controls>
<control type="panel" id="1234580">
<left>50</left>
<top>50</top>
<width>600</width>
<height>600</height>
<viewtype label="536">icon</viewtype>
<content>
<item id="1">
<label>My First Item</label>
<label2>Label 2</label2>
<icon>icon1.png</icon>
<thumb>thumb1.png</thumb>
<onclick>ActivateWindow(Home)</onclick>
<visible>true</visible>
<property name="foo">Some1stValueHere</property>
<property name="foo2">Some2ndValueHere</property>
</item>
<item id="2">
<label>My Second Item</label>
<label2>Label 2</label2>
<icon>icon2.png</icon>
<thumb>thumb2.png</thumb>
<onclick>ActivateWindow(MyMusicLibrary)</onclick>
<property name="foo">Some1stValueHere</property>
<property name="foo2">Some2ndValueHere</property>
</item>
</content>
</control>
</controls>
</window>
I'd like to create a new custom xml window that takes up the entire screen and use control type "Panel". In the panel I'd like to show thumbnail images that are dynamically learnt via a local file or via http call to local server (whichever is easier).
So far I've been able to create a custom XML with just a label and button control and open this page by activatewindow(1101) call made elsewhere. But when I change the code of this custom XML to include content type "panel", the window loads but I see nothing on the window.
Here is the custom XML I have so far. (I'm not able to get static content so far, once I get that showing, then I'll look into populating it by fetching it from the file)
I have tried a few different variations of controls under control type but none seem to show.
Your advice with some basic XML code will be much appreciated in getting me on the right track. Thanks in advance.
-------- XML file -------
<?xml version="1.0" encoding="UTF-8"?>
<window id="1101">
<defaultcontrol always="false">1234561</defaultcontrol>
<backgroundcolor>0xff00ff00</backgroundcolor>
<controls>
<control type="panel" id="1234580">
<left>50</left>
<top>50</top>
<width>600</width>
<height>600</height>
<viewtype label="536">icon</viewtype>
<content>
<item id="1">
<label>My First Item</label>
<label2>Label 2</label2>
<icon>icon1.png</icon>
<thumb>thumb1.png</thumb>
<onclick>ActivateWindow(Home)</onclick>
<visible>true</visible>
<property name="foo">Some1stValueHere</property>
<property name="foo2">Some2ndValueHere</property>
</item>
<item id="2">
<label>My Second Item</label>
<label2>Label 2</label2>
<icon>icon2.png</icon>
<thumb>thumb2.png</thumb>
<onclick>ActivateWindow(MyMusicLibrary)</onclick>
<property name="foo">Some1stValueHere</property>
<property name="foo2">Some2ndValueHere</property>
</item>
</content>
</control>
</controls>
</window>