extjs 3.3: floating panel

谁说胖子不能爱 提交于 2019-12-02 02:56:59

问题


I am trying to create a floating panel over other pre-created panels, I tried following simple codes, but failed:

var testPanel = new Ext.Panel({
                                id: 'testP',
                                width: 50,
                                height: 100,
                                floating: true,
                                title:'Test'
                            });
testPanel.show();

what else I need to think about?

thanks!


回答1:


Following needs to be taken care of when using the floating config:

1) Fixed width - which you've done 2) The position must be set explicitly after render (e.g., myPanel.setPosition(100,100);).

You can also set the underlying Ext.Layer config option instead of just setting floating : true. You can do that in the following way:

Ext.Panel({

  //.. other config..,
  floating : {
    //Ext.Layer config options. Maybe a property in that will get you the desired effect that you're looking for.
  }
});

Try this and update!

Cheers.



来源:https://stackoverflow.com/questions/7623370/extjs-3-3-floating-panel

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!