summaryrefslogtreecommitdiff
path: root/webapps/qooxdoo-0.6.3-sdk/frontend/demo/source/html/test/GridLayout_10.html
blob: b32dbc8dba89c7ab2f2b7640b5c7cb2efe10bc39 (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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
<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>Layout Manager: qx.ui.layout.GridLayout. Example image borrowed from <a href="http://winfx.msdn.microsoft.com/library/en-us/wcp_conceptual/winfx/layout/overviews/grid_ovw.asp">Microsoft's XAML Documentation</a>.</p>
  </div>

  <script type="text/javascript">
  qx.core.Init.getInstance().defineMain(function()
  {
    var img = new qx.ui.basic.Image("./image/grid_dialog_box.png");

    img.setLocation(20, 48);

    var gl = new qx.ui.layout.GridLayout;

    gl.setLocation(46, 300);
    gl.auto();
    gl.setBorder(qx.renderer.border.BorderPresets.getInstance().outset);
    gl.setPadding(4);

    gl.setRowCount(4);
    gl.setColumnCount(5);

    gl.setHorizontalSpacing(4);
    gl.setVerticalSpacing(4);

    gl.setColumnWidth(0, 40);
    gl.setColumnWidth(1, 35);
    gl.setColumnWidth(2, 75);
    gl.setColumnWidth(3, 75);
    gl.setColumnWidth(4, 75);

    gl.setRowHeight(0, 30);
    gl.setRowHeight(1, 30);
    gl.setRowHeight(2, 15);
    gl.setRowHeight(3, 25);

    gl.mergeCells(1, 0, 4, 1);
    gl.mergeCells(1, 1, 4, 1);

    gl.setRowVerticalAlignment(1, "middle");

    qx.ui.core.ClientDocument.getInstance().add(img, gl);





    var i1 = new qx.ui.basic.Image("icon/32/appearance.png");
    gl.add(i1, 0, 0);

    var t1 = new qx.ui.basic.Label("Open:");
    t1.setMnemonic("O");
    t1.setSelectable(false);
    gl.add(t1, 0, 1);

    var b1 = new qx.ui.form.Button("OK");
    b1.setAllowStretchX(true);
    gl.add(b1, 2, 3);

    var b2 = new qx.ui.form.Button("Cancel");
    b2.setAllowStretchX(true);
    gl.add(b2, 3, 3);

    var b3 = new qx.ui.form.Button("Browse...");
    b3.setAllowStretchX(true);
    b3.getLabelObject().setMnemonic("B");
    gl.add(b3, 4, 3);

    var t2 = new qx.ui.basic.Label("Type in the name of a program, folder, document or<br/> Internet Resource and Windows will open it for you.");
    t2.setSelectable(false);
    gl.add(t2, 1, 0);

    var c1 = new qx.ui.form.ComboBox();
    c1.setEditable(true);
    c1.setValue("d:\\local\\pictures");
    c1.setWidth(null);
    gl.add(c1, 1, 1);
  });
  </script>

</body>
</html>