The proplem is,that you can't see a button in your window, right? with
this code it should work:
--snip--
var win = new qx.ui.window.Window("First Window");
win.setLayout(new qx.ui.layout.VBox(10));// ----> a window must have
a layout to place widgets in it
win.setWidth(300);
win.setHeight(200);
win.setShowMinimize(false);
win.add(new qx.ui.form.Button("Second Button",
"icon/22/apps/internet-web-browser.png"));
this.getRoot().add(win, {left:20, top:20});
win.open();
--snip--
Best regards - Claus
Am Sonntag, den 21.11.2010, 10:10 +0100 schrieb slah
<[email protected]>:
> Dear Mustapha,
>
> It seems you're right but could you mind telling me how to add a layout to
> the window.
>
> Here's a formatted version of the code.
>
> /* ************************************************************************
>
> Copyright:
>
> License:
>
> Authors:
>
> ************************************************************************ */
>
> /* ************************************************************************
>
> #asset(elaweb/*)
>
> ************************************************************************ */
>
>
> /**
> * This is the main application class of your custom application "elaweb"
> */
> qx.Class.define("elaweb.Application",
> {
> extend : qx.application.Standalone,
>
>
>
> /*
>
> *****************************************************************************
>
> MEMBERS
>
> *****************************************************************************
>
> */
>
> members :
> {
> /**
> * This method contains the initial application code and gets called
> * during startup of the application
> *
> * @lint ignoreDeprecated(alert)
> */
>
>
>
>
> main : function()
> {
> // Call super class
> this.base(arguments);
>
> // Enable logging in debug variant
> if (qx.core.Variant.isSet("qx.debug", "on"))
> {
> // support native logging capabilities, e.g. Firebug for Firefox
> qx.log.appender.Native;
> // support additional cross-browser console. Press F7 to toggle
> visibility
> qx.log.appender.Console;
> }
>
> /*
>
> -------------------------------------------------------------------------
> Below is your actual application code...
>
> -------------------------------------------------------------------------
> */
>
> // Create a button
> var button1 = new qx.ui.form.Button("First Button",
> "elaweb/test.png");
>
> // Document is the application root
> var doc = this.getRoot();
>
> // Add button to document at fixed coordinates
> doc.add(button1, {left: 100, top: 50});
>
> // Add an event listener
> button1.addListener("execute", function(e) {
> // button1.hide();
> alert("Hello World!");
> });
>
> this.cw();
>
> } ,
>
> cw : function()
> {
> var win = new qx.ui.window.Window("First Window");
> win.setWidth(300);
> win.setHeight(200);
> win.setShowMinimize(false);
> win.setAllowMaximize(false);
> win.open();
> this.getRoot().add(win, {left:200, top:200});
>
> var button2 = new qx.ui.form.Button("My Button", "elaweb/test.png");
> // Add an event listener
> button2.addListener("execute", function(e) {
> alert("Hello World in First window's button 2!");
> });
> win.add(button2, {left: 100, top: 100}); //if I comment this line,
> it's ok.
>
> }
>
>
> }
> });
------------------------------------------------------------------------------
Beautiful is writing same markup. Internet Explorer 9 supports
standards for HTML5, CSS3, SVG 1.1, ECMAScript5, and DOM L2 & L3.
Spend less time writing and rewriting code and more time creating great
experiences on the web. Be a part of the beta today
http://p.sf.net/sfu/msIE9-sfdev2dev
_______________________________________________
qooxdoo-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel