将元素添加到选项卡面板的一部分
所以我有一个 TabPanel
定义如下:
panel = new Ext.TabPanel({
fullscreen: true,
cardSwitchAnimation: 'slide',
ui: 'dark',
items: [home, faq, about]
});
home
部分定义如下:
home = new Ext.Component({
title: "Home",
scroll: 'vertical',
tpl: [
'<tpl for="."',
' <div messageId="{message_id}">',
' </div>',
'</tpl>'
]
});
现在,仅在 home
选项卡上,我想要一个部分就在 TabPanel
下面,它将包含一些其他元素,具体来说,一个文本框、按钮和两个下拉列表。
如何添加它们,以便内容部分仍然以相同的方式运行,并且直到这些添加的元素下方才开始?
So I have a TabPanel
defined like so:
panel = new Ext.TabPanel({
fullscreen: true,
cardSwitchAnimation: 'slide',
ui: 'dark',
items: [home, faq, about]
});
The home
section is defined like so:
home = new Ext.Component({
title: "Home",
scroll: 'vertical',
tpl: [
'<tpl for="."',
' <div messageId="{message_id}">',
' </div>',
'</tpl>'
]
});
Now, ONLY on the home
tab, I want a section right underneath the TabPanel
that is going to contain some other elements, specifically, a textbox, button, and two dropdowns.
How can I add them so that the content section still acts the same way and doesn't start until underneath these added elements?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
这并不是 100% 清楚你的目标是什么,但听起来你只是想在你的“主页”卡中将两个面板堆叠在一起,如下所示......如果你需要控制每个子项目有多少空间我认为您需要特别查看
layout
属性hbox
。或者,您可能一直在谈论拥有第二个工具栏之类的东西,在这种情况下,请查看dockedItems。
It's not 100% clear what your aim is, but it sounds like you just want to stack two panels on top of each other within your 'home' card as below.... If you need to control how much room each sub-item takes up you need to look at
layout
properties specificallyhbox
I think.Alternatively you might have been talking about having something like a second toolbar, in which case take a look at dockedItems.