Created
January 18, 2010 09:15
-
-
Save wittemann/279903 to your computer and use it in GitHub Desktop.
resetter [qx]
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// create a textfield | |
var textField = new qx.ui.form.TextField("acb"); | |
this.getRoot().add(textField, {left: 10, top: 10}); | |
// create a checkbox | |
var checkBox = new qx.ui.form.CheckBox("box"); | |
this.getRoot().add(checkBox, {left: 10, top: 40}); | |
// create a list | |
var list = new qx.ui.form.List(); | |
list.add(new qx.ui.form.ListItem("a")); | |
list.add(new qx.ui.form.ListItem("b")); | |
list.setSelection([list.getSelectables()[0]]); | |
this.getRoot().add(list, {left: 10, top: 70}); | |
// create the resetter | |
var resetter = new qx.ui.form.Resetter(); | |
// add the form items | |
resetter.add(textField); | |
resetter.add(checkBox); | |
resetter.add(list); | |
// add a reset button | |
var resetButton = new qx.ui.form.Button("Reset"); | |
resetButton.addListener("execute", function() { | |
resetter.reset(); | |
}); | |
this.getRoot().add(resetButton, {left: 120, top: 10}); | |
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment