extjs 3.3:浮动面板 [英] extjs 3.3: floating panel

查看:390
本文介绍了extjs 3.3:浮动面板的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试在其他预先创建的面板上创建一个浮动面板,我尝试了以下简单的代码,但失败了:

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();

我还需要考虑什么?

谢谢!

推荐答案

使用浮动 config:

1)固定宽度 - 您已经完成
2)必须在渲染后明确设置该位置 >(例如 myPanel.setPosition(100,100); )。

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

您还可以设置底层的Ext.Layer配置选项,而不是设置 floating:true 。您可以按照以下方式执行此操作:

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

尝试此更新!

干杯。

这篇关于extjs 3.3:浮动面板的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆