flex 添加右键链接
private var myMenu:ContextMenu;
private function setViewerVersion():void
{
var menuItem:ContextMenuItem = new ContextMenuItem("技术支持:中科天宇软件有限公司", true, true);
menuItem.addEventListener(ContextMenuEvent.MENU_ITEM_SELECT, function(event:ContextMenuEvent):void
{
navigateToURL(new URLRequest("http://www.tiannyu.com/"));
});
myMenu = new ContextMenu();
myMenu.customItems.push(menuItem); myMenu.hideBuiltInItems();
this.contextMenu = myMenu; if (this.contextMenu)
{
if (this.contextMenu["customItems"] is Array)
{
while((this.contextMenu["customItems"] as Array).length>0)
{
(this.contextMenu["customItems"] as Array).pop();
}
(this.contextMenu["customItems"] as Array).push(menuItem);
}
else if (this.contextMenu["addItem"])
{
this.contextMenu["addItem"](menuItem);
}
}
}
flex 添加右键链接的更多相关文章
- Beyond Compare 3添加右键菜单
目前是在Beyond Compare 3.1.9版本上试验可行,其他版本上尚未测试. 添加右键菜单步骤: 1.新建为.bat后缀的文本,将下面“添加右键菜单批处理”复制到此文本中. 2.将批处理移动到 ...
- 添加右键使用 SublimeText 打开
最近修改了系统,重新安装 SublimeText 但是在安装的时候忘记设置右键使用 SublimeText 打开,所以就需要写注册表. 可以复制下面的代码到一个记事本,然后保存为 sublime_ad ...
- C# DataGridView添加右键菜单的简单应用
首先,参考了下以下文章: https://blog.csdn.net/qin_zhangyongheng/article/details/23773757 感谢. 项目中要在DataGridView中 ...
- pyqt5-为QListWidget添加右键菜单
如何在pyqt5下为QListWidget添加右键菜单? 能百度到的均是pyqt4下的,有些貌似并不好用. 在尝试了很多方法后,下面贴出可用的方法: from PyQt4 import QtCore, ...
- 添加右键菜单命令 在此处打开命令窗口(E)(带图标)
@color 0A @title 添加右键菜单命令 在此处打开命令窗口(^&E)(带图标) by wjshan0808 @echo off reg add HKCR\Directory\Bac ...
- 【博客美化】05.添加GitHub链接
博客园美化相关文章目录: [博客美化]01.推荐和反对炫酷样式 [博客美化]02.公告栏显示个性化时间 [博客美化]03.分享按钮 [博客美化]04.自定义地址栏logo [博客美化]05.添加Git ...
- 在WordPress后台菜单系统中添加Home链接
在wordpress后台如果想打开前台的话,要想先把鼠标移动到左上角菜单,然后在下拉菜单中点击“查看站点”,很是麻烦,能不能在 WordPress 后台菜单系统中添加 Home 链接呢? 将下面代码复 ...
- 仅在TabControl中的Tab中添加右键菜单
若想实现仅在TabControl中的Tab中添加右键菜单,可在XAML中通过使用样式得到: <TabControl> <TabControl.ItemContainerStyle&g ...
- [cb] Unity Editor 添加右键菜单
需求 为Unity的Editor窗口添加右键菜单 实现代码 // This example shows how to create a context menu inside a custom Edi ...
随机推荐
- HtmlAgilityPack教程
解析html教程(重点) http://www.cnblogs.com/kissdodog/archive/2013/02/28/2936950.html 完整的教程 http://www.cnblo ...
- Android系统自带样式(@android:style/)
在AndroidManifest.xml文件的activity中配置 1.android:theme="@android:style/Theme" 默认状态,即如果theme这里不 ...
- 这是我定位的Bug
https://github.com/danielgindi/ios-charts/issues/406
- Android图片缓存的框架ImageLoader的使用
DisplayImageOptions options; // DisplayImageOptions是用于设置图片显示的类 // 使用DisplayImageOptions.Build ...
- Make Rules
target: components ls TAB rule main:main.o mytool1.o mytool2.o gcc -o main main.o mytool1.o mytool2. ...
- Java Socket常见异常处理 和 网络编程需要注意的问题
在java网络编程Socket通信中,通常会遇到以下异常情况: 第1个异常是 java.net.BindException:Address already in use: JVM_Bind. 该异常发 ...
- 《30天自制操作系统》05_day_学习笔记
//bootpack.c 完整代码 #include <stdio.h> void io_hlt(void); void io_cli(void); void io_out8(int po ...
- Leetcode: Combination Sum IV && Summary: The Key to Solve DP
Given an integer array with all positive numbers and no duplicates, find the number of possible comb ...
- Lintcode: Route Between Two Nodes in Graph
Given a directed graph, design an algorithm to find out whether there is a route between two nodes. ...
- java-语句
JAVA语句 1.顺序语句(用:结束)(一个分号也是一个语句)(多条语句形成符合语句) 2.分支语句(又称条件语句) 1. if 语句 例: int a=10 if(a>0) {System ...