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

How to insert a string to a edittext based on cursor position using a button click how can I do it?

Contributor ,
Feb 24, 2020 Feb 24, 2020

Okay this is what I want to achieve.

var win = new Window ("palette", "Get Cursor Position", undefined);

var groupOne = win.add("group", undefined, "Group One");
groupOne.orientation = "column";

    var etOne = groupOne.add("edittext", [0,0,300,100], "I want to get the cursor information from here", {multiline : true});
    var etTwo = groupOne.add("edittext", [0,0,300,100], "Insert this text to about EditText", {multiline : true});
    var button = groupOne.add("button", undefined, "Just Do it");
    
win.center();
win.show();

I've two edittext elements.In first etOne I've some text. And I want to store the cursor position when it's being edited. And I want to insert the string from etTwo to etOne's last cursor position on Button click. How to do that?

TOPICS
How to , Resources , Scripting
509
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

Advocate , Feb 25, 2020 Feb 25, 2020
Translate
Advocate ,
Feb 25, 2020 Feb 25, 2020
LATEST
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