创建自定义折叠面板 - Extjs 4.0a2
好的,这是一个简单的。 我需要创建一个具有折叠功能的简单自定义面板。 问题是我需要控制折叠按钮的位置,并且我需要控制折叠模式用户界面(也就是说,我希望面板以折叠模式显示某些内容,而不仅仅是标题。
例如: 我想创建一个搜索面板,它将嵌套在应用程序页面上方的视口中。每个页面都可以访问搜索面板标题及其可折叠的高级搜索表单。在折叠模式下,只有简单的搜索和标题可见。
这是折叠之前的图像:(单击圆圈箭头后,面板将展开以显示高级搜索)
这是折叠后的图像:
您将如何实现此类功能?
ok here is an easy one.
I need to create a simple custom panel that will have a collapse functionality.
The thing is I need to control over the collapse button position, and I need to control the collapsed mode UI (that is I want the panel to show somethings in collapsed mode and not just the title.
for example :
I want to create a search panel that will be nested in a viewport above a the pages of the application. each page will have access to the search panel title and its advance search form which is collapsible. in a collapse mode only a simple search and the title are visible.
here is an image before the collapse: (once clicking the circled arrow the panel will expand to show the advance search)
here is an image after the collapse:
how would you go about to implement such functionality?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我会在 vbox 布局中使用两个面板,顶部一个包含基本搜索,底部一个包含高级搜索。
在顶部面板中,我只需添加向下箭头的图像并处理 onclick 事件来切换底部面板。
I would use two panels in a vbox layout, the top one contains the basic search, and the bottom one contains the advanced search.
In the top panel I would just add an image of a down arrow and handle the onclick event to toggle the bottom panel.