ScriptUI readonly edittext with justify = "center" ?
In the great Peter Kahrel's latest issue of the ScriptUI guide, (the value of which approaches the incalculable
) there are examples of adding an "edittext" input text field with a "readonly" creation property to make sure users can't overwrite the shown text, and there are example of doing the same and making it center-justified. However, there is not an example which shows both at the same time. I want center-justified readonly edittext.
This appears to be at least more of a CC issue, as in CS5 the following works while in CC2015 it does not:
function test(){
var w = new Window("dialog", "Test");
var e = w.add("edittext", undefined, "abcde", {readonly : true});
e.justify = "center";
e.characters = 10;
w.show();
};
test();
Adding it as resource string does work in CC2015, but putting "readonly : true" into the curly braces has no desired effect.
function test2(){
var w = new Window("dialog", "Test");
var e = w.add('edittext {text: "abcde", characters: 10, justify: "center"}');
e.characters = 10;
w.show();
};
test2();
Maybe there's some other interesting way to add the 'readonly' property to the resource string, or to add the 'justify' property to the non-string method so that they will work in CC2015?
