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

Error updating dialog window

Engaged ,
Jul 26, 2022 Jul 26, 2022

Copy link to clipboard

Copied

Hello friends!

Can anyone explain why when using "w.layout.layout(true)" all the elements of the window are resized making a mess and running away from the original sizes? Initially I created my windows with undefined sizes using this great site: https://scriptui.joonas.me/ but I got this defect, then I tried to use another method determined the sizes of each element but the error continues.
Could someone out there show me the best method when I need to use the refresh window? Thanks.

 

 

w = new Window ('dialog');
w.preferredSize = [300, 400];
w.grp1 = w.add ('group');
w.grp1.add('panel', [0,0,100,100], 'None');
w.grp1.add('panel', [0,0,100,100], 'Gray');
w.grp1.add('panel', [0,0,100,100], 'Black');
w.grp1.add('panel', [0,0,100,100], 'White');
w.grp2 = w.add ('group');
w.grp2.add('panel', [0,0,100,100], 'Etched');
w.grp2.add('panel', [0,0,100,100], 'Sunken');
w.grp2.add('panel', [0,0,100,100], 'Raised');

b2 = w.add("button", [0,0,100,25]);  b2.text = "Updade W"; 

b2.onClick = function(){
    w.layout.layout(true)
};


w.show();

 

 

 

 

TOPICS
Actions and scripting

Views

171

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

Guide , Jul 27, 2022 Jul 27, 2022

JavaScript Tools Guide p. 165

2022-07-27_11-57-36.png

Yes, this is normal behavior, because when you call the function, you specify recalculate = true. If the panel does not contain any elements, its size is recalculated.

Votes

Translate

Translate
Adobe
Guide ,
Jul 27, 2022 Jul 27, 2022

Copy link to clipboard

Copied

JavaScript Tools Guide p. 165

2022-07-27_11-57-36.png

Yes, this is normal behavior, because when you call the function, you specify recalculate = true. If the panel does not contain any elements, its size is recalculated.

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
Engaged ,
Jul 27, 2022 Jul 27, 2022

Copy link to clipboard

Copied

LATEST

Thanks @jazz-y . I'm going to do some tests here.

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