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

How to make focus on input field in dialog?

Explorer ,
May 05, 2018 May 05, 2018

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

        },

      ];

TOPICS
Scripting

Views

859

Translate

Translate

Report

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 , May 06, 2018 May 06, 2018

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

Votes

Translate

Translate
Adobe
Community Expert ,
May 05, 2018 May 05, 2018

Copy link to clipboard

Copied

set its active property to true

Votes

Translate

Translate

Report

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
Explorer ,
May 05, 2018 May 05, 2018

Copy link to clipboard

Copied

that does't work

Votes

Translate

Translate

Report

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
Community Expert ,
May 05, 2018 May 05, 2018

Copy link to clipboard

Copied

Post a full sample script please

Votes

Translate

Translate

Report

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
Explorer ,
May 05, 2018 May 05, 2018

Copy link to clipboard

Copied

this is what was added

diaogGroup.elements = [

        {

            "type":"edittext",

            "value":"",

            "characters":1,

            "visible":true,

            "active":true // make no effect

        },

      ];

Votes

Translate

Translate

Report

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
Community Expert ,
May 06, 2018 May 06, 2018

Copy link to clipboard

Copied

LATEST

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

Votes

Translate

Translate

Report

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