Quantcast
Channel: Adobe Community : Discussion List - After Effects Scripting
Viewing all articles
Browse latest Browse all 2143

ListBox´s items icon not being drawn

$
0
0

Hello there

I´ve facing a problem with the listbox´s items icon. On Mac they don´t get drawn as you can see in the animation below. It is very strange if you keep clicking the button you´ll see that some get drawn other doesn´t.

ListBox_Problem.gif

 

if you see the animation above when I make active the listbox the icons get drawn. I´ve tried hard to fix this problem trying to force an update on the listbox but nothing seems to help.

 

Here is the sample test code as well as the icon just put it in the desktop.

icon.png

 

    var img = Folder.desktop.fsName+"/icon.png";    var items = ["One","Two","Three","Four","Five","Six","Seven","Eight","Nine","Ten"];       var win = new Window("dialog","Tester",[0,0,300,400]);           var lb = win.add("listbox",[0,0,300,370],[]);           var btn = win.add("button",[0,370,300,390],"Update List");        btn.onClick = function(){                                lb.removeAll();                                for(i = 0; i<items.length; i++){                                    var item = lb.add("item",items[i]);                                    item.image = img;                                }                             }          win.center();    win.show();

 

By the way this only happens on a mac (AE CC ,2014, 2015), on pc it works fine.

Any help would be really appreciated.

 

 

Thanks


Viewing all articles
Browse latest Browse all 2143

Trending Articles