philspitler wrote:Your code works in Extended Script but gives me and error when I try and run it in AE.
I ran into the same thing last weekend. I had forgotten about this post, thanks for the reminder. Here is what I found worked in AE for me.
Code: Select all
{
var res = "dialog\
myListbox: ListBox { alignment:['fill','fill'], properties:{\
multiselect:true, \
numberOfColumns:5, \
showHeaders:true, \
columnTitles: ['Header 1', 'Header 2', 'Header 3', 'Header 4', 'Header 5', ]}\
}";
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';
/// Row 3 Contents
var myItem3 = myPalette.myListbox.add ('item', '');
myItem3.subItems[0].text = '';
myItem3.subItems[1].text = '';
myPalette.show(); //Shows final Window with contents
}