开发者

Overflow:hidden for Ext.Window for ExtJs

I'm thinking of using Ext.Window for my project. I was wondering whethe开发者_C百科r it is possible to have an Ext.Window to partially shown in the Browser window?

Like half of the window got stuck out of the browser window from the left.

Cheers, Mickey


Yes, it is possible. Run this example, click the button to launch an Ext.Window, then drag it partially out of view.

But if you uncomment the constrain: true configuration, it will not be allowed to be dragged outside of the browser view.

<html>
  <head>
    <link rel="stylesheet" href="ext-3.1.1/resources/css/ext-all.css" />
    <script src="ext-3.1.1/adapter/ext/ext-base.js"></script>
    <script src="ext-3.1.1/ext-all-debug.js"></script>
    <script>
      Ext.BLANK_IMAGE_URL = 'ext-3.1.1/resources/images/default/s.gif';
      Ext.onReady(function(){
        var p = new Ext.Panel({
          renderTo: 'panel',
          html: 'panel',
          tbar: [{
            text: 'Show a Modal Window',
            handler: function() {
              new Ext.Window({
                //constrain: true,
                title: 'Title',
                html: 'Window',
                modal: true
              }).show();
            }
          }]
        });
      });
    </script>
  </head>
  <body>
    <div id="panel"></div>
  </body>
</html>


It depends on the details of what you are doing. Yes, you could position the window as needed programmatically and set overflow:hidden on the document body to prevent scrollbars (if that's what you mean). Or you could hide only the x overflow and still scroll vertically.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜