
Untitled
By: a guest on
May 11th, 2012 | syntax:
None | size: 0.55 KB | hits: 16 | expires: Never
// Create a button
var button1 = new qx.ui.form.Button("First Button", "icon/22/apps/internet-web-browser.png");
// Document is the application root
var doc = this.getRoot();
var decorator= new qx.ui.decoration.Single().set({
backgroundColor : "white",
style: "solid",
width: 2,
color: "red"
});
// Add button to document at fixed coordinates
doc.add(button1,
{
left : 100,
top : 50
});
// Add an event listener
button1.addListener("execute", function(e) {
alert("Hello World!");
});
button1.setDecorator(decorator);
this.debug("Finished");