Question
Add IconButton dynamically
Hi,<br /><br />What I am trying to achieve is a display a list of folders in a window. Each of these folders contain PNG files.<br /><br />I want to display these png files as icons in a panel in the window. While it displays the first file in the loop it does not display the rest. Any ideas on what I am doing wrong in the following code snippet?<br /><br />w.DropDownList.onChange= function()<br />{ <br /> iconFolder=Folder("/C/XYZ/"+this.selection.text);<br /> iconFileList= iconFolder.getFiles("*.png");<br /> x=10;<br /> y=10;<br /> for (var h=0; h<iconFileList.length; h++)<br /> {<br /> w.iconPnl.add ("iconbutton", [x,y,70,70], iconFileList);<br /> x=x+71;<br /> }<br /> <br />}