Copy link to clipboard
Copied
Hello!
I need to redraw a window but i cant figure it out!? Do i need to close it first?
w = new Window("dialog","Test");
test1 = w.add("statictext",undefined,"test1"); //Shows up
w.show();
test2 = w.add("statictext",undefined,"test2"); // Does not show!
w.show();
app.redraw();
Any ideas?
// Aasdfasdfasdfasdf
One button is OK, click to add, click once again to delete.
var w = new Window("dialog","Test");
var btn = w.add("button",undefined,"add/del statictext");
var test1 = w.add("statictext",undefined,"test1");
var test2 = null;
btn.onClick = function () {
if (!test2) {
test2 = w.add("statictext",undefined,"test2");
} else {
w.remove(test2);
test2= null;
}
w.layout.layout(1);
}
w.show();
Copy link to clipboard
Copied
Hi asdfasdfasdf
Can I order you please to rename and use another profile name?
It´s just to prevent your current name to be considered Spam.
Thank you a lot and best regards
Gustavo
Copy link to clipboard
Copied
yeah i know, when i created the account i tried at least 15 regular usernames but it said that all was taken!! So i got mad and just typed something
Now when i change the username it says that its been changed but nothing is happening so i dont know!! im mad again...Grrr
Copy link to clipboard
Copied
Method 1: use a button to ctrl
var w = new Window("dialog","Test");
var btn = w.add("button",undefined,"add statictext");
var test1 = w.add("statictext",undefined,"test1");
btn.onClick = function () {
var test2 = w.add("statictext",undefined,"test2");
w.layout.layout(1);
}
w.show();
Method 2: use a palette window
w = new Window("palette","Test");
test1 = w.add("statictext",undefined,"test1");
w.show();
$.sleep(500); // don't need, just for demo
test2 = w.add("statictext",undefined,"test2");
w.layout.layout(1);
Copy link to clipboard
Copied
Thaanks man!
Now i know how to add a staticfield with a button but, what if i want to remove it with another button?
Is that possible?
Copy link to clipboard
Copied
One button is OK, click to add, click once again to delete.
var w = new Window("dialog","Test");
var btn = w.add("button",undefined,"add/del statictext");
var test1 = w.add("statictext",undefined,"test1");
var test2 = null;
btn.onClick = function () {
if (!test2) {
test2 = w.add("statictext",undefined,"test2");
} else {
w.remove(test2);
test2= null;
}
w.layout.layout(1);
}
w.show();
Copy link to clipboard
Copied
Aah nice! Thanks u so much!!