summaryrefslogtreecommitdiff
path: root/swat/apps/qooxdoo-examples/test/Window_2.html
blob: 0a1c3153d236c185e532f87467e6e65cd42a15b9 (plain)
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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
<html>
<head>
  <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  <title>qooxdoo &raquo; Demo</title>
  <link type="text/css" rel="stylesheet" href="../../resource/css/layout.css"/>
  <!--[if IE]>
  <link type="text/css" rel="stylesheet" href="../../resource/css/layout_ie.css"/>
  <![endif]-->
  <script type="text/javascript" src="../../script/qx.js"></script>
</head>
<body>
  <script type="text/javascript" src="../../script/layout.js"></script>

  <div id="demoDescription">
    <p>Testing auto dimension possibility of qx.ui.window.Window.</p>
  </div>

  <script type="text/javascript">
  qx.core.Init.getInstance().defineMain(function()
  {
    var d = qx.ui.core.ClientDocument.getInstance();

    var w1 = new qx.ui.window.Window("First Window");
    w1.getPane().setPadding(10);
    w1.setLocation(100, 100);
    w1.setWidth("auto");
    w1.setHeight("auto");

    d.add(w1);

    var a1 = new qx.ui.basic.Atom("Welcome to your first own Window.<br/>Have fun!", "icon/32/bookmark.png");
    a1.set({ top: 0, left: 100 });
    w1.add(a1);

    var chk1 = new qx.ui.form.CheckBox("Show Statusbar");
    chk1.set({ top: 45, left: 0 });

    chk1.addEventListener("changeChecked", function(e) {
      w1.setShowStatusbar(e.getData());
    });

    var btn1 = new qx.ui.form.Button("Yes", "icon/16/button-ok.png");
    btn1.set({ top: 70, left : 0 });

    var btn2 = new qx.ui.form.Button("No", "icon/16/button-cancel.png");
    btn2.set({ top: 70, right : 0 });

    w1.add(chk1, btn1, btn2);

    w1.open();
  });
  </script>
</body>
</html>