【问题标题】:How to know whether the window is maximized or minimised in extjs?extjs中如何知道窗口是最大化还是最小化?
【发布时间】:2012-06-07 03:53:04
【问题描述】:

有谁知道如何在 IE8 中检查表单是最大化还是最小化。

拉吉

【问题讨论】:

    标签: internet-explorer browser extjs extjs3


    【解决方案1】:

    使用以下代码解决:

    var S = this.tabpanelFormation.getPosition();
        if (Ext.isIE8 && S[0] == 751) {
                this.tabpanelFormation.setPagePosition(749,370,true);
                this.tabpanelFormation.setHeight(230);
                this.tabpanelFormation.setWidth(350);
        }
    

    如果最大化则 S[0] = 751。由此我们可以找到 whet

    【讨论】:

      【解决方案2】:

      在此处浏览他们的文档: http://docs.sencha.com/ext-js/3-4/#!/api

      您可以使用 window.screen.width 和 window.screen.height 来获取正在使用的屏幕的尺寸。

      然后您可以使用 getPosition() 并确保它位于 0,0 并使用 getHeight() 和 getWidth() 并确保它们与屏幕尺寸相匹配。

      【讨论】:

      • 嗨@Caleb我正在使用Ext.TabPanel
      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2018-06-15
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2012-02-29
      相关资源
      最近更新 更多