So I have a (hopefully) simple one this time. I have a ScriptUI window programmed in ExtendScript for Adobe InDesign CS6. It contains a StaticText control. After this dialog window is shown to the user, I would like to change the text of that StaticText control based upon some action the user takes. Here is a very simplified version of my problem:
var w = new Window("dialog");
var t = w.add("statictext", undefined, "Hello");
w.show();
t.text = "Good evening";
In the above example, "Hello" never changes to "Good evening". I have discovered, however, that if I add a Progress Bar control to this window and update it periodically along with the StaticText control, it WILL allow the text to change, but then the text gets truncated if the second line is longer than the original text.
It's as though the width of the StaticText control is set at creation time and can never ever be changed after its window is shown. If this is simply a limitation of ScriptUI, just let me know and I'll deal with it. Otherwise, please tell me if there's anything I can do to have that StaticText change dynamically and accept longer lines of text without getting truncated. Thanks!