Copy link to clipboard
Copied
How to make the value field be focused when dialog opened? I.e. the idea is to imitate user click in the input field to make it active.
diaogGroup.elements = [
{
"type":"edittext",
"value":"",
"characters":1,
"visible":true
},
];
Hi andyf65867865,
I never used you coding style.
Try this example:
var w = new Window("dialog", "Example Dialog");
w.dialogGroup = w.add("group");
w.dialogGroup.el1 = w.dialogGroup.add("edittext", undefined, "Edit Text 1");
w.dialogGroup.el2 = w.dialogGroup.add("edittext", undefined, "Edit Text 2");
w.dialogGroup.el1.active = true;
w.show();
Have fun
Copy link to clipboard
Copied
set its active property to true
Copy link to clipboard
Copied
that does't work
Copy link to clipboard
Copied
Post a full sample script please
Copy link to clipboard
Copied
this is what was added
diaogGroup.elements = [
{
"type":"edittext",
"value":"",
"characters":1,
"visible":true,
"active":true // make no effect
},
];
Copy link to clipboard
Copied
Hi andyf65867865,
I never used you coding style.
Try this example:
var w = new Window("dialog", "Example Dialog");
w.dialogGroup = w.add("group");
w.dialogGroup.el1 = w.dialogGroup.add("edittext", undefined, "Edit Text 1");
w.dialogGroup.el2 = w.dialogGroup.add("edittext", undefined, "Edit Text 2");
w.dialogGroup.el1.active = true;
w.show();
Have fun