2017-02-12 124 views
0
var myWindow = Ext.create('Ext.window.Window', { 
    header: false, 
    style: 'background-color: transparent; border: false', 
    bodyStyle: 'background-color: transparent; background-image: url(graphics/ss_message.png); background-size: 100% 100%;', 
    id: 'ss_banner', 
    width: 250, 
    height: component.getBox().height, 
    border: false, 
    bodyBorder: false, 
    frame: false, 
    cls: 'noPanelBorder', 
}); 

我使用的窗口xtype,因爲我似乎無法使容器/面板出現,即使我添加renderTo: Ext.getBody(),它不起作用。ExtJS的4.2 - 刪除窗口的邊界?

窗口顯示爲這樣: enter image description here

我也試着用css我不確定,而在其性能使用。

任何幫助,非常感謝。

+0

貴國是否能顯示你的問題的工作小提琴? – MarthyM

回答

4

刪除窗口邊框

如果你真的要刪除一個窗口的邊框,可以使用以下配置:

var myWindow = Ext.create('Ext.window.Window', { 

    // ... 

    // What shows the 'border' is actually just the background of the window 
    // shown via padding (+ 1px of actual border) 
    style: 'padding: 0; border-width: 0;', 
    // Show automatically 
    autoShow: true, 
    // Disable resizing, if you want 
    resizable: false, 
}); 

這裏是removing window borders

顯示的工作小提琴一個面板

ħ H但是,如果你不希望使用的窗口功能的任何,並可能與容器或面板做,你應該使用它們。所有你應該需要的是renderTo配置你提到,將面板呈現給身體或任何其他元素。我不知道爲什麼這個配置不適合你,它在下面的小提琴中完美的工作。

您可以嘗試通過cls配置屬性增加一類獨特的面板和呈現的HTML代碼進行搜索。由於某種原因,它可能被正確渲染並且不可見。

這裏是rendering panel to element

編輯的工作小提琴:
如果需要只顯示圖像,存在ExtJS的,Ext.Img圖像組件。您可以按照我爲面板描述的相同方式使用此組件。

0

這個工作對我來說:

var myWindow = Ext.create('Ext.window.Window', { 
    // What shows the 'border' is actually just the background of the window 
    // shown via padding (+ 1px of actual border) 
    style: 'padding: 0; border-width: 0;', 
});