Hi,
I searched for a framework-provided functionality to group ToggleButtons, like
it’s possible to group RadioButtons. After some searching I came to the
conclusion that there is no build in functionality (or is it?).
I tried the following code snipped in the playground and it works like a charm
☺ so maybe it’s a possible feature for the ToggleButton.
qx.Class.define("demobrowser.demo.widget.ToggleButton", {
extend : qx.ui.form.ToggleButton,
implement : [qx.ui.form.IRadioItem],
properties : {
group : {
init : null
}
}
});
// Create the buttons
var button1 = new demobrowser.demo.widget.ToggleButton("First Button",
"icon/22/apps/internet-web-browser.png");
var button2 = new demobrowser.demo.widget.ToggleButton("Second Button",
"icon/22/apps/internet-web-browser.png");
var button3 = new demobrowser.demo.widget.ToggleButton("Third Button",
"icon/22/apps/internet-web-browser.png");
var group = new qx.ui.form.RadioGroup();
//group.setAllowEmptySelection(true);
group.add(button1, button2, button3);
group.addListener("changeSelection", function(e) {
this.debug(e.getTarget().getSelection()[0].getLabel());
}, this);
var doc = this.getRoot();
// Add button to document at fixed coordinates
doc.add(button1, {left : 100, top : 50});
doc.add(button2, {left : 100, top : 100});
doc.add(button3, {left : 100, top : 150});
Link to playground example:
http://tinyurl.com/293yr9f
Regards,
Andreas
------------------------------------------------------------------------------
This SF.net email is sponsored by Sprint
What will you do first with EVO, the first 4G phone?
Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first
_______________________________________________
qooxdoo-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel