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>Tests for qx.ui.form.RadioButton. qx.ui.form.RadioButton extends qx.ui.basic.Atom and so it inherits all the options and properties defined there.</p>
16 <p>To group multiple QxRadioButtons you must define a instance of qx.manager.selection.RadioManager and add them to this new instance. All QxRadioButtons assigned to the same group make sure that only one of them is checked at the same time.</p>
20 <script type="text/javascript">
21 qx.core.Init.getInstance().defineMain(function()
23 var d = qx.ui.core.ClientDocument.getInstance();
25 var rb1 = new qx.ui.form.RadioButton("Option #1", "rb1");
33 var rb2 = new qx.ui.form.RadioButton("Option #2", "rb2");
43 var rb3 = new qx.ui.form.RadioButton("Top RadioButton", "rb3");
48 setIconPosition("top");
52 var rb4 = new qx.ui.form.RadioButton("Bottom RadioButton", "rb4");
57 setIconPosition("bottom");
62 var rb5 = new qx.ui.form.RadioButton("Left RadioButton", "rb5");
67 setIconPosition("left");
71 var rb6 = new qx.ui.form.RadioButton("Right RadioButton", "rb6");
76 setIconPosition("right");
80 var rb7 = new qx.ui.form.RadioButton(null, "rb7");
89 var rg1 = new qx.manager.selection.RadioManager("mygroup", [rb1, rb2, rb3, rb4, rb5, rb6, rb7]);
95 var linfo = new qx.ui.basic.Atom("Current Value: \"" + rg1.getSelected().getLabel() + "\" (" + rg1.getSelected().getValue() + ")", "icon/16/forward.png");
99 setBorder(qx.renderer.border.BorderPresets.getInstance().black);
101 setBackgroundColor("white");
106 rg1.addEventListener("changeSelected", function(e) {
107 linfo.setLabel("Current Value: \"" + e.getData().getLabel() + "\" (" + e.getData().getValue() + ")");