2012-06-20 32 views
1

目前,我有一個使用BorderContainer佈局,如下圖所示:道場使用BorderContainer佈局

enter image description here

我對這個佈局代碼:

<div data-dojo-type="dijit.layout.BorderContainer" data-dojo-props="design:'sidebar', gutters:true, liveSplitters:true" id="borderContainer"> 
<div data-dojo-type="dijit.layout.ContentPane" data-dojo-props="splitter:true, region:'left'" style="width: 150px;" id="treeSection">Tree menu display here</div> 
<div data-dojo-type="dijit.layout.ContentPane" data-dojo-props="splitter:true, region:'top'" style="height:200px;" id="gridSection">Dojo Grid display here 
</div> 
<div data-dojo-type="dijit.layout.ContentPane" data-dojo-props="splitter:true, region:'center'" id="contactView" data-dojo-id="contactView">contact detail here 
</div> 
</div> 

我想有一個佈局(2列,右列有3行)如下所示: enter image description here

回答

1

BorderContainers可以嵌入作爲區域。您的例子是:

  • 使用BorderContainer(父)
    • 的contentPane(區域左明確的寬度)
    • 的contentPane(區域頂部顯式高度)
    • 使用BorderContainer(區域中心,流體)
      • contentpane(region top,explicit height)
      • contentpane(region center,fluid)
+1

我曾嘗試這種方法之前,發現它很難保持所有的部件之間的一致的填充。 –