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

Update a dialog window

Engaged ,
Jul 21, 2022 Jul 21, 2022

Copy link to clipboard

Copied

Hello guys! Is there any way to update all elements in a dialog without restarting it.

w = new Window("dialog"); w.text = "FinalisarPedido"; 
w.orientation = "column"; 

p1 = w.add("panel", undefined, undefined, {name: "p1"}); 
p1.text = "Panel"; 
p1.orientation = "column"; 
p1.alignChildren = ["left","top"]; 
p1.spacing = 10; 
p1.margins = 10; 

st1 = p1.add("statictext", undefined, undefined, {name: "st1"}); 
st1.text = "StaticText"; 

et1 = p1.add('edittext {properties: {name: "et1"}}'); 
et1.text = "EditText"; 

b1 = p1.add("button", undefined, undefined, {name: "b1"}); 
b1.text = "Button"; 

ck = p1.add("checkbox", undefined, undefined, {name: "ck"}); 
ck.text = "Checkbox"; 

rb = p1.add("radiobutton", undefined, undefined, {name: "rb"}); 
rb.text = "radio button"; 

dl_array = ["Item 1","-","Item 2"]; 
dl = p1.add("dropdownlist", undefined, undefined, {name: "dl", items: dl_array}); 
dl.selection = 0; 

b2 = w.add("button", undefined, undefined, {name: "b2"}); 
b2.text = "Updade W"; 

b2.onClick = function(){
    alert("Redraw or reset this window without closing it!")
}; 

w.show();
TOPICS
Actions and scripting

Views

368

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 22, 2022 Jul 22, 2022

Redraws the dialog, updating the position of all elements. But I'm not sure if this is exactly what you need.

b2.onClick = function(){
    w.layout.layout(true)
    alert("Redraw or reset this window without closing it!")
}; 

 

Votes

Translate

Translate
Adobe
LEGEND ,
Jul 21, 2022 Jul 21, 2022

Copy link to clipboard

Copied

I'm not sure what you are asking. Do you want to change the values of your controls?

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 22, 2022 Jul 22, 2022

Copy link to clipboard

Copied

Hi @Lumigraphics , the solution I need is exactly the grandiose @jazz-y 's answer which I'm very grateful. Thanks for sharing knowledge.

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
Guide ,
Jul 22, 2022 Jul 22, 2022

Copy link to clipboard

Copied

Redraws the dialog, updating the position of all elements. But I'm not sure if this is exactly what you need.

b2.onClick = function(){
    w.layout.layout(true)
    alert("Redraw or reset this window without closing it!")
}; 

 

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 22, 2022 Jul 22, 2022

Copy link to clipboard

Copied

Thanks for sharing your knowledge @jazz-y 

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
LEGEND ,
Jul 22, 2022 Jul 22, 2022

Copy link to clipboard

Copied

LATEST

When a window is laid out, you need to do this after adding your controls.

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