ExtJS 4 - 获取 Ext.toolbar 的溢出菜单
有没有办法在具有 enableOverflow:true
的 Ext.toolbar 上获取分别用于溢出菜单和“更多按钮”的 Ext.menu 和/或 Ext.Button 组件?
我尝试将侦听器附加到工具栏的 overflowchange
事件,看看是否可以使用 query()
或 getComponent()
来查找按钮/菜单当它被显示时,但是当调整工具栏大小以导致溢出菜单出现/消失时,该事件似乎不会触发。我还监视了工具栏的 add
事件,以查看当“更多”按钮添加到工具栏时是否触发该事件,但也没有运气。
Is there a way to get the Ext.menu and/or the Ext.Button components used for the overflow menu and "more button" respectively on a Ext.toolbar that has enableOverflow:true
?
I tried attaching a listener to the toolbar's overflowchange
event to see if I could use query()
or getComponent()
to find the button/menu when it was being shown, but that event does not seem to fire when resizing the toolbar to cause the overflow menu to appear/disappear. I also monitored the toolbar's add
event to see if that was fired when the "more" button was added to the toolbar, but no luck there either.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
在 Sencha 论坛的帮助下弄清楚了:
http://www.sencha.com /forum/showthread.php?160597-Getting-a-toolbar-s-overflow-menu
溢出菜单组件位于:
toolbar.layout.overflowHandler.menu
但请注意,
overflowHandler
的menu
属性仅在实际需要菜单时才出现。Figured it out, with help from the Sencha Forums:
http://www.sencha.com/forum/showthread.php?160597-Getting-a-toolbar-s-overflow-menu
The overflow menu component resides in:
toolbar.layout.overflowHandler.menu
Be care though, the
menu
property ofoverflowHandler
is only present when the menu is actually needed.