Try adding the following line after var win = new qx.ui.window.Window("First
Window");:

win.setLayout(new qx.ui.layout.Canvas());

On Sun, Nov 21, 2010 at 4:10 PM, slah <[email protected]> wrote:

>
> 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.
>
>    }
>
>
>  }
> });
> --
> View this message in context:
> http://qooxdoo.678.n2.nabble.com/beginner-s-question-tp5759778p5760678.html
> Sent from the qooxdoo mailing list archive at Nabble.com.
>
>
> ------------------------------------------------------------------------------
> 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
>
------------------------------------------------------------------------------
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

Reply via email to