Copy link to clipboard
Copied
main();
function main()
{
var w = new Window ("dialog","test");
var Columns = w.add("group"); Columns.spacing=0;
var Header = {numberOfColumns: 1, showHeaders: true, columnWidths: [50]};
Header.columnTitles = ["month"];
var Col = Columns.add ("listbox", undefined, ["1","2","3","4","5","6","7","8","9","10","11","12"], Header);
Col.preferredSize = [65,85];
Col.selection = 8;
Col.revealItem(8);
w.show();
}
revealItem does not apply.
Where I went wrong?
Thanks for help.
Instead of:
Col.revealItem(8);
try:
w.onShow = function(){Col.revealItem(8)}
The onShow event is activated when the window is shown, and only then do you try to select item 8, and then it works.
Why this should be the case with the new SciptUI engine is another question, but if this were the only problem with it...
Copy link to clipboard
Copied
MY first thought was that you try to reveal an item before the dialog is built.
But then I copied your code into the ESTK and it worked just fine.
Copy link to clipboard
Copied
Hi,
This is works in InDesign 5.5 version . but CC2014 not works.
It needed another source?
<- CC 2014
Copy link to clipboard
Copied
Instead of:
Col.revealItem(8);
try:
w.onShow = function(){Col.revealItem(8)}
The onShow event is activated when the window is shown, and only then do you try to select item 8, and then it works.
Why this should be the case with the new SciptUI engine is another question, but if this were the only problem with it...
Copy link to clipboard
Copied
Thank you !
Find more inspiration, events, and resources on the new Adobe Community
Explore Now