[英]border layout code breaking, not able to see the content
https://docs.sencha.com/extjs/4.1.3/#!/api/Ext.layout.container.Border https://docs.sencha.com/extjs/4.1.3/#!/api/Ext.layout.container.Border
I am trying to change border in the below part of code 我正在尝试在代码的以下部分更改边框
var createTreeAndContentPanel = function(tree) {
var retval,
contentPanel;
According to docs, if you are using a "Border" layout, at least one of the child panel has to use region : "center". 根据文档,如果您使用的是“边框”布局,则至少一个子面板必须使用region:“ center”。 So you need to apply
region : center
on your panel containing tabs, and region : west
to your panel containing tree. 因此,您需要在包含标签的面板上应用
region : center
在包含树的面板上应用region : west
。
Finally you need to add these 2 panels inside a parent panel with a layout: border
最后,您需要将这2个面板添加到具有以下
layout: border
的父面板中layout: border
From doc : 从文档:
Any Container using the Border layout must have a child item with region:'center'.
任何使用“边框”布局的“容器”都必须有一个子项,其区域为“ center”。 The child item in the center region will always be resized to fill the remaining space not used by the other regions in the layout.
中心区域中的子项将始终调整大小以填充布局中其他区域未使用的剩余空间。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.