数据网格中带有标题窗口的上下文菜单
我想添加一个带有标题窗口中的数据网格的上下文菜单,添加后什么也没有发生。
[Bindable]
public var cm:ContextMenu;
private function init(event:FlexEvent):void
{
var cmi:ContextMenuItem = new ContextMenuItem("View item...", true);
cmi.addEventListener(ContextMenuEvent.MENU_ITEM_SELECT,
ontextMenuItem_menuItemSelect);
cm = new ContextMenu();
cm.hideBuiltInItems();
cm.customItems = [cmi];
}
我在标题窗口的 creationComplete
事件上调用 init 函数。
请帮忙!!
I want to add a context menu with a datagrid which is in a title window, after adding it nothing happens.
[Bindable]
public var cm:ContextMenu;
private function init(event:FlexEvent):void
{
var cmi:ContextMenuItem = new ContextMenuItem("View item...", true);
cmi.addEventListener(ContextMenuEvent.MENU_ITEM_SELECT,
ontextMenuItem_menuItemSelect);
cm = new ContextMenu();
cm.hideBuiltInItems();
cm.customItems = [cmi];
}
I am calling init function on creationComplete
event of title window.
Please help!!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
刚刚也遇到这个问题。为了让它适用于我的项目,我必须在 TitleWindow 上显式设置这两个值:
Just came across this issue as well. To get it working for my project, I had to explicitly set both of these on the TitleWindow: