在柔性右键上下文菜单中隐藏的默认选项 [英] Hide default options in right click context menu in flex

查看:110
本文介绍了在柔性右键上下文菜单中隐藏的默认选项的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在开发一个Flex应用程序,我想添加一个快捷菜单。我知道了这个code:

I'm developing a flex application and I want to add it a context menu. I got it with this code:

var myMenu:ContextMenu = new ContextMenu();
myMenu.hideBuiltInItems();
var defaultItems:ContextMenuBuiltInItems = myMenu.builtInItems;
defaultItems.print = false;

var item:ContextMenuItem = new ContextMenuItem("Go to google");
myMenu.customItems.push(item);
item.addEventListener(ContextMenuEvent.MENU_ITEM_SELECT, menuItemSelectHandler);

this.contextMenu = myMenu;

不过,我有一个问题。菜单显示四个默认选项(设置,约闪...)我想隐藏起来。随着defaultItems.print = FALSE;我躲在打印选项,但我不知道如何隐藏他人。 是否有人知道如何做到这一点? 谢谢你。

But I have a problem. The menu shows four default options (Settings, about flash...) I would like to hide them. With defaultItems.print = false; I hid the print option, but I don't know how to hide others. Does anybody know how to do that? Thanks.

推荐答案

作为的文本菜单说,

您不能删除设置菜单   从上下文菜单项。该   设置菜单项是必需的   闪光灯,使用户可以访问   设置会影响隐私和   存储在计算机上。你也是   不能删除关于菜单项,   这是必需的,以便用户可以   找出Flash播放器是什么版本   他们正在使用。

You cannot remove the Settings menu item from the context menu. The Settings menu item is required in Flash so that users can access the settings that affect privacy and storage on their computers. You also cannot remove the About menu item, which is required so that users can find out what version of Flash Player they are using.

所以,你就得忍受的设置关于项目。对于其他默认项,请参阅参考<一href="http://livedocs.adobe.com/flex/3/langref/flash/ui/ContextMenuBuiltInItems.html">ContextMenuBuiltInItems.

So you'll just have to live with the Settings and About items. For other default items, see the reference for ContextMenuBuiltInItems.

这篇关于在柔性右键上下文菜单中隐藏的默认选项的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆