Raptor
Raptor

Reputation: 54222

qooxdoo : How to popup a Window that covers whole screen?

How to popup a Window that covers whole screen ?

I have the following code:

Application.js

this.__panel = new myApp.MyPanel();
this.__panel.open();

MyPanel.js

qx.Class.define("myApp.MyPanel",
{
  extend : qx.ui.window.Window,

    construct : function()
    {
      this.base(arguments, "My Panel");
      // adjust size
      this.setWidth(800);
      this.setHeight(480);
    }
});

Instead of 800 x 480, I would like the Window to be open in full screen, without Title and close button. How can I achieve this ?

Upvotes: 0

Views: 776

Answers (2)

Raptor
Raptor

Reputation: 54222

To cover the whole screen, use the following lines:

this.setWidth(qx.bom.Viewport.getWidth());
this.setHeight(qx.bom.Viewport.getHeight());

Don't forget to handle browser resizing !

Also, to hide the title bar, add this line:

this.getChildControl("captionbar").setVisibility("excluded"); 

Upvotes: 1

Martin Wittemann
Martin Wittemann

Reputation: 2115

You can use the maximize method to set the window to full screen. But that will still show the caption bar containing the buttons. Depending on what you want, you can hide / disable each of the buttons. If you don't want the caption bar at all, I would simply add the content of the window to the root of you app.

Upvotes: 2

Related Questions