Entering text in new line
I made a dialog box that contains a text box field for employee comments, that later converts to a text layer.
Is it possible to enter text in a multiple lines on text box (because if I press ENTER, my dialog box closes)?
I made a dialog box that contains a text box field for employee comments, that later converts to a text layer.
Is it possible to enter text in a multiple lines on text box (because if I press ENTER, my dialog box closes)?
var d = new Window("dialog")
var t1 = d.add("edittext", undefined, "", {multiline:true, scrollable:false});
t1.preferredSize = [300, 50];
var b = d.add("button", undefined, "OK");
d.defaultElement = null;
b.onClick = function () { activeDocument.activeLayer.textItem.contents = t1.text.replace(/\n/g, "\r"); }
d.show();
Already have an account? Login
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.