1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37
|
var pos = photonui.Helpers.getAbsolutePosition("demo");
var win1 = new photonui.Window({ title: "Window 1", visible: true, padding: 10, x: pos.x + 20, y: pos.y + 50, child: new photonui.Button({ text: "Center Me", callbacks: { click: function(widget, event) { win1.center(); win1.y = pos.y; } } }), callbacks: { "close-button-clicked": function(widget) { widget.destroy(); } } });
var win2 = new photonui.Window({ title: "Window 2", visible: true, height: 100, closeButtonVisible: false, x: pos.x, y: pos.y });
win1.show();
|