2 Replies Latest reply on Jul 20, 2009 9:51 AM by try67

    when i use buttonSetIcon no icon is ever displayed on the button.


      Im creating a button in Folder Level Script, first im importing an icon into the document, no errors are thrown

      so i assume the icon is imported i even printed the icons object out and saw that that icon was imported successfully!

      heres a snippet of my code!


            var edtBtn = aNewDoc.addField("edtBtn" + i, "button", 0, [20, 20, 600, 20]);

            aNewDoc.importIcon("Q5img", timgQ5);

            console.println("Icon imported: " + timgQ5); // timgQ5 = desination to my png

            var q5img = util.iconStreamFromIcon(aNewDoc.getIcon("Q5img"));

            edtBtn .buttonSetIcon(q5img);

            edtBtn .buttonSetCaption(timgM5);

            console.println("Icon added to button!");