边框布局代码中断,无法看到内容
border layout code breaking, not able to see the content
- 我有 hbox 布局,左边显示树,右边显示树
它显示标签。
- 但问题是我不应该使用hbox,但我应该使用border
布局。
- 当我使用两列布局时,代码被破坏了。
- 为我的代码提供 hbox 布局。
- 你们能告诉我如何使下面的代码在边框中工作吗
布局。
https://docs.sencha.com/extjs/4.1.3/#!/api/Ext.layout.container.Border
我正在尝试在下面的代码部分更改边框
var createTreeAndContentPanel = function(tree) {
var retval,
contentPanel;
根据文档,如果您使用的是 "Border" 布局,则至少有一个子面板必须使用区域:"center"。
因此,您需要在包含选项卡的面板上应用 region : center
,并在包含树的面板上应用 region : west
。
最后,您需要将这 2 个面板添加到带有 layout: border
的父面板中
来自文档:
Any Container using the Border layout must have a child item with region:'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.
- 我有 hbox 布局,左边显示树,右边显示树 它显示标签。
- 但问题是我不应该使用hbox,但我应该使用border 布局。
- 当我使用两列布局时,代码被破坏了。
- 为我的代码提供 hbox 布局。
- 你们能告诉我如何使下面的代码在边框中工作吗 布局。
https://docs.sencha.com/extjs/4.1.3/#!/api/Ext.layout.container.Border
我正在尝试在下面的代码部分更改边框
var createTreeAndContentPanel = function(tree) {
var retval,
contentPanel;
根据文档,如果您使用的是 "Border" 布局,则至少有一个子面板必须使用区域:"center"。
因此,您需要在包含选项卡的面板上应用 region : center
,并在包含树的面板上应用 region : west
。
最后,您需要将这 2 个面板添加到带有 layout: border
来自文档:
Any Container using the Border layout must have a child item with region:'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.