extjs 3.3: floating panel
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',
w开发者_开发百科idth: 50,
height: 100,
floating: true,
title:'Test'
});
testPanel.show();
what else I need to think about?
thanks!
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.
精彩评论