2011-10-01 94 views
2

我試圖創造超過其他預創建面板浮動面板,我嘗試以下簡單的代碼,但沒有成功ExtJS的3.3:浮動面板

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

我需要什麼考慮?

謝謝!要採取

回答

1

以下需要護理使用floating配置時:

1)固定寬度的 - 你已經做了 2)的位置必須顯式設置渲染後(例如,myPanel.setPosition(100,100);)。

您也可以設置底層的Ext.Layer配置選項,而不是僅設置floating : true。你可以這樣做:

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

嘗試此並進行更新!

乾杯。