Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
0

scripting: Increase EditText elements

Explorer ,
Oct 10, 2022 Oct 10, 2022

image.pngexpand image

I would like to increase the "EditText" element when plus button clicked.

My test script does not allow me to increase the element...
Could anyone please tell me how to do this?

thank you.

var dialog = new Window ("dialog", "Test", undefined, {resizeable:true});

var group_ui = dialog.add("group", undefined, {name: "group_ui"}); 
    group_ui.orientation = "row"; 
var plusBtn = dialog.group_ui.add("button", undefined, undefined, {name: "plusbtn"});
    plusBtn.text = "+";
var minusBtn = dialog.group_ui.add("button", undefined, undefined, {name: "minusbtn"});
    minusBtn.text = "-";

function ViewEditTextList(){
    dialog.statictext = new Array();
    for (i=0; i<myCount; i++){
    dialog.statictext[i] = dialog.add("edittext", undefined, undefined, {name: "EditText"}); 
    dialog.statictext[i].text = "text_test"
    }
}

var myCount = 2;

plusBtn.onClick = function(){
    myCount = myCount+1;
    ViewEditTextList()
}

ViewEditTextList()

dialog.show();

 

TOPICS
Expressions , FAQ , How to , Scripting
176
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Community Expert , Oct 10, 2022 Oct 10, 2022

Does it help to call

dialog.layout.layout(true)

and/or

dialog.layout.resize()

after adding more text fields?

Translate
Community Expert ,
Oct 10, 2022 Oct 10, 2022
LATEST

Does it help to call

dialog.layout.layout(true)

and/or

dialog.layout.resize()

after adding more text fields?

Mathias Möhl - Developer of tools like BeatEdit and Automation Blocks for Premiere Pro and After Effects
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines