qooxdoo:如何弹出覆盖整个屏幕的窗口?

时间:2013-05-22 08:09:20

标签: qooxdoo

如何弹出覆盖整个屏幕的窗口?

我有以下代码:

的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);
    }
});

而不是800 x 480,我希望窗口全屏打开,没有标题和关闭按钮。我怎样才能做到这一点?

2 个答案:

答案 0 :(得分:2)

您可以使用maximize方法将窗口设置为全屏。但是仍然会显示包含按钮的标题栏。根据您的需要,您可以隐藏/禁用每个按钮。如果您根本不需要标题栏,我只需将窗口内容添加到您应用的根目录。

答案 1 :(得分:1)

要覆盖整个屏幕,请使用以下行:

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

不要忘记处理浏览器大小调整!

另外,要隐藏标题栏,请添加以下行:

this.getChildControl("captionbar").setVisibility("excluded"); 
相关问题