3 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
4 <title>qooxdoo » Demo</title>
5 <link type="text/css" rel="stylesheet" href="../../resource/css/layout.css"/>
7 <link type="text/css" rel="stylesheet" href="../../resource/css/layout_ie.css"/>
9 <script type="text/javascript" src="../../script/qx.js"></script>
12 <script type="text/javascript" src="../../script/layout.js"></script>
14 <div id="demoDescription">
15 <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>
18 <script type="text/javascript">
19 qx.core.Init.getInstance().defineMain(function()
21 var img = new qx.ui.basic.Image("./image/grid_dialog_box.png");
23 img.setLocation(20, 48);
25 var gl = new qx.ui.layout.GridLayout;
27 gl.setLocation(46, 300);
29 gl.setBorder(qx.renderer.border.BorderPresets.getInstance().outset);
35 gl.setHorizontalSpacing(4);
36 gl.setVerticalSpacing(4);
38 gl.setColumnWidth(0, 40);
39 gl.setColumnWidth(1, 35);
40 gl.setColumnWidth(2, 75);
41 gl.setColumnWidth(3, 75);
42 gl.setColumnWidth(4, 75);
44 gl.setRowHeight(0, 30);
45 gl.setRowHeight(1, 30);
46 gl.setRowHeight(2, 15);
47 gl.setRowHeight(3, 25);
49 gl.mergeCells(1, 0, 4, 1);
50 gl.mergeCells(1, 1, 4, 1);
52 gl.setRowVerticalAlignment(1, "middle");
54 qx.ui.core.ClientDocument.getInstance().add(img, gl);
60 var i1 = new qx.ui.basic.Image("icon/32/appearance.png");
63 var t1 = new qx.ui.basic.Label("Open:");
65 t1.setSelectable(false);
68 var b1 = new qx.ui.form.Button("OK");
69 b1.setAllowStretchX(true);
72 var b2 = new qx.ui.form.Button("Cancel");
73 b2.setAllowStretchX(true);
76 var b3 = new qx.ui.form.Button("Browse...");
77 b3.setAllowStretchX(true);
78 b3.getLabelObject().setMnemonic("B");
81 var t2 = new qx.ui.basic.Label("Type in the name of a program, folder, document or Internet Resource and Windows will open it for you.");
82 t2.setSelectable(false);
83 t2.setStyleProperty("whiteSpace", "normal");
86 var c1 = new qx.ui.form.ComboBox();
88 c1.setValue("d:\\local\\pictures");
100 var c1 = new qx.ui.form.Button("Make bigger");
101 var c2 = new qx.ui.form.Button("Make smaller");
103 c1.setLocation(500, 300);
104 c2.setLocation(500, 330);
106 qx.ui.core.ClientDocument.getInstance().add(c1, c2);
108 c1.addEventListener("execute", function(e) {
109 gl.setColumnWidth(2, 100);
110 gl.setColumnWidth(3, 100);
111 gl.setColumnWidth(4, 100);
114 c2.addEventListener("execute", function(e) {
115 gl.setColumnWidth(2, 75);
116 gl.setColumnWidth(3, 75);
117 gl.setColumnWidth(4, 75);