0

我想要一个具有这种结构的 BorderContainer:

在此处输入图像描述

我有这个代码,但它不起作用。底部的高度不起作用,所以我不知道如何解决它。

                this.bc = new BorderContainer({
                    style: "height: 100%; width: 100%;",
                    design:'sidebar',
                    gutters:true,
                    liveSplitters:true,
                });

                this.cp1 = new ContentPane({
                    region: "leading",
                    style: "width: 50%;height : 50%;",
                    content: '<div style="width:100%;height:100%"></div>',
                    splitter:true
                });
                this.bc.addChild(this.cp1);

                this.cp2 = new ContentPane({
                    region: "center",
                    style: "width: 50%;height : 50%;",
                    content: '<div style="width:100%;height:100%"></div>',
                    splitter:true
                });
                this.bc.addChild(this.cp2);

                this.cp3 = new ContentPane({
                    region : "bottom",
                    style: "height : 50%",
                    content: '<div style="width:100%;height:100%"></div>',
                    splitter:true
                });
                this.bc.addChild(this.cp3);

                dijit.byId("containerPane").addChild(this.bc, 0);

                this.bc.startup();

                this.bc.resize();
4

1 回答 1

2

我不确定你所说的底部高度不起作用是什么意思,你能更具体一点吗?这是一个工作 jsfiddle 也许这会有所帮助? http://jsfiddle.net/edchat/1cr6hsfa/

尺寸不适用于 50%,因为拆分器和填充占用了空间,因此您没有空间让两个 contentPanes 都使用 50%。

而且我认为您不想设计:'sidebar'

design:'sidebar', 
于 2015-01-23T18:58:20.397 回答