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

ScriptUI: panel does not contain what it should

Community Expert ,
Jun 18, 2018 Jun 18, 2018

Copy link to clipboard

Copied

Dear friends.

I want to have input-field and browse button in one row and framed by a named panel.

However, my script does not put the groups into the respective panels. What's wrong with it?

// Dialog_test.jsx

// #target framemaker

  sInfo = "• Line 1 of text\n• Line 2 of 3\n• Last line" ;

  wDlg  = new Window("dialog", "Project-analysis", undefined);

  wDlg.alignChildren = ['left',' '];

    wDlg.st1 = wDlg.add('statictext', undefined, sInfo, {multiline:true});

    wDlg.st1.preferredSize.width = 360;

    wDlg.st1.preferredSize.height = 60;

  wDlg.p1 = wDlg.add ('panel', undefined, "Script directory");

  wDlg.p1.g1 = wDlg.add('group',undefined,"");    // ---

    wDlg.p1.g1.sScriptFolder = wDlg.p1.g1.add('edittext',undefined,"");

    wDlg.p1.g1.sScriptFolder.preferredSize.width = 360;

    wDlg.p1.g1.sScriptFolder.preferredSize.height = 20;

    wDlg.p1.g1.btnBrowseScript = wDlg.p1.g1.add('button',undefined,"Browse");

  wDlg.p2 = wDlg.add ('panel', undefined, "Output directory");

  wDlg.p2.g2 = wDlg.add('group',undefined,"");    // ---

    wDlg.p2.g2.sOutFolder = wDlg.p2.g2.add('edittext',undefined,"");

    wDlg.p2.g2.sOutFolder.preferredSize.width = 360;

    wDlg.p2.g2.sOutFolder.preferredSize.height = 20;

    wDlg.p2.g2.btnBrowseOutput = wDlg.p2.g2.add('button',undefined,"Browse");

//wDlg.g3 = wDlg.add('group',undefined,"");    // ---

    wDlg.btnOK = wDlg.add('button',undefined,"Analyse modules");

  wDlg.show();

It jsut looks like this (both in ESTK and with FM targetted):

ESTK-dialog_test.png

TOPICS
Scripting

Views

488

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

Enthusiast , Jun 18, 2018 Jun 18, 2018

Hi Klaus,

A small problem with lines 13 and 20 in your script. They should read respectively:

wDlg.p1.g1 = wDlg.p1.add('group',undefined,"");

and

wDlg.p2.g2 = wDlg.p2.add('group',undefined,"");

You were adding the groups to the dialog and not into the panels.

Ian

Votes

Translate

Translate
Enthusiast ,
Jun 18, 2018 Jun 18, 2018

Copy link to clipboard

Copied

Hi Klaus,

A small problem with lines 13 and 20 in your script. They should read respectively:

wDlg.p1.g1 = wDlg.p1.add('group',undefined,"");

and

wDlg.p2.g2 = wDlg.p2.add('group',undefined,"");

You were adding the groups to the dialog and not into the panels.

Ian

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 ,
Jun 18, 2018 Jun 18, 2018

Copy link to clipboard

Copied

LATEST

Thank You, Ian,

After a break with some food I also discovered this - so there was 'just' my brain undernourished...

Klaus

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