Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Listbox – Add Image

  • Listbox – Add Image

    Posted by Tudor Baican on August 1, 2023 at 7:44 pm

    Hello friends,

    my follow script will create a multicolumn listbox and I also would like to add an image in a row.

    So far so good, but after the window appears there is no image. I click inside the Listbox and the image appears.

    What I have forgot?

    Thanks for your help

    {


    var res = "dialog\

    myListbox: ListBox { alignment:['fill','fill'], properties:{\

    multiselect:true, \

    numberOfColumns:3, \

    showHeaders:true, \

    columnTitles: ['Header 1', 'Header 2', 'Header 3']}\

    }";

    var myPalette = new Window(res); //Creates Window

    /// Row 1 Contents

    var myItem1 = myPalette.myListbox.add ('item', 'Cell 1-1');

    myItem1.subItems[0].text = 'Cell 1-2';

    myItem1.subItems[1].text = 'Cell 1-3';

    /// Row 2 Contents

    var myItem2 = myPalette.myListbox.add ('item', 'Cell 2-1');

    myItem2.subItems[0].text = 'Cell 2-2';

    myItem2.subItems[1].text = 'Cell 2-3';

    myItem2.subItems[1].image = File("~/Desktop/Asset 5.png");

    myPalette.show();


    }

    Tudor Baican replied 2 years, 9 months ago 2 Members · 2 Replies
  • 2 Replies
  • Hector Vera

    August 2, 2023 at 3:07 pm

    I think you may have to type in the full directory of the file. I see: “~/Desktop/Asset 5.png” in the code like if its incomplete. Not sure if its usually done this way but try writing in the code the Drive Letter directory and then the folders within that drive leading to Asset 5.png . Hopefully that helps. I think that the code is a bit confused on how it wants the image to appear but since you can view it through another method, you can experiment with the directory code and see if you have better luck.

  • Tudor Baican

    August 2, 2023 at 8:44 pm

    Hi Hector, thanks for your suggestion. I tried different path options and also as binary text. Always the same behavior. I think is a bug 😤

We use anonymous cookies to give you the best experience we can.
Our Privacy policy | GDPR Policy