<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Li Guoliang &#187; Flex右键</title>
	<atom:link href="http://liguoliang.com/tag/flex%e5%8f%b3%e9%94%ae/feed/" rel="self" type="application/rss+xml" />
	<link>http://liguoliang.com</link>
	<description>ActionScript Flex Java JEE PHP...</description>
	<lastBuildDate>Wed, 08 Feb 2012 01:44:22 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Flex中使用ContextMenu　－　添加,动态改变, 响应.</title>
		<link>http://liguoliang.com/2009/flex%e4%b8%ad%e4%bd%bf%e7%94%a8contextmenu%e3%80%80%ef%bc%8d%e3%80%80%e6%b7%bb%e5%8a%a0%e5%8a%a8%e6%80%81%e6%94%b9%e5%8f%98-%e5%93%8d%e5%ba%94/</link>
		<comments>http://liguoliang.com/2009/flex%e4%b8%ad%e4%bd%bf%e7%94%a8contextmenu%e3%80%80%ef%bc%8d%e3%80%80%e6%b7%bb%e5%8a%a0%e5%8a%a8%e6%80%81%e6%94%b9%e5%8f%98-%e5%93%8d%e5%ba%94/#comments</comments>
		<pubDate>Thu, 26 Mar 2009 03:31:43 +0000</pubDate>
		<dc:creator>老李</dc:creator>
				<category><![CDATA[ActionScript]]></category>
		<category><![CDATA[Flex]]></category>
		<category><![CDATA[ContextMenu]]></category>
		<category><![CDATA[Flex右键]]></category>
		<category><![CDATA[Flex菜单]]></category>

		<guid isPermaLink="false">http://liguoliang.com/2009/03/840/</guid>
		<description><![CDATA[<p>AIR Only: <a href="http://liguoliang.com/2009/03/837/">AIR: 通过监听ContextMenuEvent.MENU_SELECT事件 动态改变菜单内容 </a></p>
<p>\ 这里是通用的:
<pre class="java" name="code".
	//Menus
	private var _menu:ContextMenu;
	private var _menuAddTopOU:ContextMenuItem;
	private var _menuAdd:ContextMenuItem;
	private var _menuEdit:ContextMenuItem;
	private var _menuRemove:ContextMenuItem;
</pre>
<pre class="java" name="code">
		_menu = new ContextMenu();
		_menuAddTopOU = new ContextMenuItem(RM.getString(BUNDLE_OUSETUP, "ous.menu.addTopOU"));
		_menuAdd = new ContextMenuItem(null, true);
		_menuEdit = new ContextMenuItem(null);
		_menuRemove = new ContextMenuItem(null);

		_menu.customItems.push(_menuAddTopOU);
		_menu.customItems.push(_menuAdd);
		_menu.customItems.push(_menuEdit);
		_menu.customItems.push(_menuRemove);
		_menu.addEventListener(ContextMenuEvent.MENU_SELECT, onMenuSelected);
		_menu.addEventListener(Event.SELECT, onMenuItemSelected);

		_treeOUs.contextMenu = _menu;

	// Menu打开后动态改变菜单内容
	private function onMenuSelected(event:ContextMenuEvent):void {
		...
		_menuAddTopOU.enabled = !tempNew; // add Top ou
		_menuAdd.enabled = (_treeOUs.selectedItem != null) &#038;&#038; (!_editorOU.editable);	// add ou
		if(_menuAdd.enabled) {
			_menuAdd.label = RM.getString(BUNDLE_OUSETUP, "ous.menu.add", [currentOU.nameFullLocalized]);
		}else {
			_menuAdd.label = RM.getString(BUNDLE_OUSETUP, "ous.menu.selectOneFirst");
		}

		..
	}

	// 选中Menu中某item后响应
	private function onMenuItemSelected(event:Event):void {
		if(event.target == _menuAddTopOU) { // 增加顶级部门
			onAction(_actionAddTopOU, null);
		}else ...
	}
</pre>]]></description>
		<wfw:commentRss>http://liguoliang.com/2009/flex%e4%b8%ad%e4%bd%bf%e7%94%a8contextmenu%e3%80%80%ef%bc%8d%e3%80%80%e6%b7%bb%e5%8a%a0%e5%8a%a8%e6%80%81%e6%94%b9%e5%8f%98-%e5%93%8d%e5%ba%94/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>AIR: 通过监听ContextMenuEvent.MENU_SELECT事件 动态改变菜单内容</title>
		<link>http://liguoliang.com/2009/flex-%e9%80%9a%e8%bf%87%e7%9b%91%e5%90%accontextmenueventmenu_select%e4%ba%8b%e4%bb%b6-%e5%8a%a8%e6%80%81%e6%94%b9%e5%8f%98%e8%8f%9c%e5%8d%95%e5%86%85%e5%ae%b9/</link>
		<comments>http://liguoliang.com/2009/flex-%e9%80%9a%e8%bf%87%e7%9b%91%e5%90%accontextmenueventmenu_select%e4%ba%8b%e4%bb%b6-%e5%8a%a8%e6%80%81%e6%94%b9%e5%8f%98%e8%8f%9c%e5%8d%95%e5%86%85%e5%ae%b9/#comments</comments>
		<pubDate>Thu, 26 Mar 2009 01:47:30 +0000</pubDate>
		<dc:creator>老李</dc:creator>
				<category><![CDATA[ActionScript]]></category>
		<category><![CDATA[Air Menu]]></category>
		<category><![CDATA[ContextMenu]]></category>
		<category><![CDATA[Flex Menu]]></category>
		<category><![CDATA[Flex右键]]></category>
		<category><![CDATA[NativeMenu]]></category>

		<guid isPermaLink="false">http://liguoliang.com/2009/03/837/</guid>
		<description><![CDATA[某Tree上的menu
		_menu = new NativeMenu();
		_menuAddTopOU = new NativeMenuItem(&#34;Add Top OU&#34;);
		_menuAdd = new NativeMenuItem(&#34;Selcet one<p class='read-more'><a href='http://liguoliang.com/2009/flex-%e9%80%9a%e8%bf%87%e7%9b%91%e5%90%accontextmenueventmenu_select%e4%ba%8b%e4%bb%b6-%e5%8a%a8%e6%80%81%e6%94%b9%e5%8f%98%e8%8f%9c%e5%8d%95%e5%86%85%e5%ae%b9/'>More...</a></p>]]></description>
		<wfw:commentRss>http://liguoliang.com/2009/flex-%e9%80%9a%e8%bf%87%e7%9b%91%e5%90%accontextmenueventmenu_select%e4%ba%8b%e4%bb%b6-%e5%8a%a8%e6%80%81%e6%94%b9%e5%8f%98%e8%8f%9c%e5%8d%95%e5%86%85%e5%ae%b9/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>使用ActionScript建立DataGrid, 添加右键, 增加列, 并设定列的ItemRenderer</title>
		<link>http://liguoliang.com/2009/%e4%bd%bf%e7%94%a8actionscript%e5%bb%ba%e7%ab%8bdatagrid-%e6%b7%bb%e5%8a%a0%e5%8f%b3%e9%94%ae-%e5%a2%9e%e5%8a%a0%e5%88%97-%e5%b9%b6%e8%ae%be%e5%ae%9a%e5%88%97%e7%9a%84itemrender/</link>
		<comments>http://liguoliang.com/2009/%e4%bd%bf%e7%94%a8actionscript%e5%bb%ba%e7%ab%8bdatagrid-%e6%b7%bb%e5%8a%a0%e5%8f%b3%e9%94%ae-%e5%a2%9e%e5%8a%a0%e5%88%97-%e5%b9%b6%e8%ae%be%e5%ae%9a%e5%88%97%e7%9a%84itemrender/#comments</comments>
		<pubDate>Mon, 05 Jan 2009 16:59:39 +0000</pubDate>
		<dc:creator>老李</dc:creator>
				<category><![CDATA[ActionScript]]></category>
		<category><![CDATA[Air右键]]></category>
		<category><![CDATA[DataGrid]]></category>
		<category><![CDATA[DataGridColumn]]></category>
		<category><![CDATA[Flex右键]]></category>

		<guid isPermaLink="false">http://liguoliang.com/2009/01/679/</guid>
		<description><![CDATA[很多时候为了获得对组件的灵活控制, 不得不放弃MXML, 直接使用ActionScript.<p class='read-more'><a href='http://liguoliang.com/2009/%e4%bd%bf%e7%94%a8actionscript%e5%bb%ba%e7%ab%8bdatagrid-%e6%b7%bb%e5%8a%a0%e5%8f%b3%e9%94%ae-%e5%a2%9e%e5%8a%a0%e5%88%97-%e5%b9%b6%e8%ae%be%e5%ae%9a%e5%88%97%e7%9a%84itemrender/'></a></p>]]></description>
		<wfw:commentRss>http://liguoliang.com/2009/%e4%bd%bf%e7%94%a8actionscript%e5%bb%ba%e7%ab%8bdatagrid-%e6%b7%bb%e5%8a%a0%e5%8f%b3%e9%94%ae-%e5%a2%9e%e5%8a%a0%e5%88%97-%e5%b9%b6%e8%ae%be%e5%ae%9a%e5%88%97%e7%9a%84itemrender/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>AIR中通过右键直接选定基于LIST容器[DataGrid, List, Tree等]的数据 &#8211; Select List item with mouse right-click</title>
		<link>http://liguoliang.com/2009/air%e4%b8%ad%e9%80%9a%e8%bf%87%e5%8f%b3%e9%94%ae%e7%9b%b4%e6%8e%a5%e9%80%89%e5%ae%9a%e5%9f%ba%e4%ba%8elist%e5%ae%b9%e5%99%a8datagrid-list-tree%e7%ad%89%e7%9a%84%e6%95%b0%e6%8d%ae-select-list-ite/</link>
		<comments>http://liguoliang.com/2009/air%e4%b8%ad%e9%80%9a%e8%bf%87%e5%8f%b3%e9%94%ae%e7%9b%b4%e6%8e%a5%e9%80%89%e5%ae%9a%e5%9f%ba%e4%ba%8elist%e5%ae%b9%e5%99%a8datagrid-list-tree%e7%ad%89%e7%9a%84%e6%95%b0%e6%8d%ae-select-list-ite/#comments</comments>
		<pubDate>Mon, 05 Jan 2009 15:18:16 +0000</pubDate>
		<dc:creator>老李</dc:creator>
				<category><![CDATA[AIR]]></category>
		<category><![CDATA[Air右键]]></category>
		<category><![CDATA[DataGrid]]></category>
		<category><![CDATA[Flex右键]]></category>
		<category><![CDATA[List]]></category>
		<category><![CDATA[Tree]]></category>

		<guid isPermaLink="false">http://liguoliang.com/2009/01/675/</guid>
		<description><![CDATA[在很多情况下, 我们在DataGrid, List, Tree等容器中使用右键, 进行如修改, 删除 某行的操作.  问题是如果该容器初始状态下直接进行右键点击时, 并不能选定任何数据. 通过监听右键菜单SELECT事件, 获取到当前右键所击位置的Index, 并将之赋值给DataGrid或其他容器的SelectIndex, 完成点击操作<p class='read-more'><a href='http://liguoliang.com/2009/air%e4%b8%ad%e9%80%9a%e8%bf%87%e5%8f%b3%e9%94%ae%e7%9b%b4%e6%8e%a5%e9%80%89%e5%ae%9a%e5%9f%ba%e4%ba%8elist%e5%ae%b9%e5%99%a8datagrid-list-tree%e7%ad%89%e7%9a%84%e6%95%b0%e6%8d%ae-select-list-ite/'></a></p>]]></description>
		<wfw:commentRss>http://liguoliang.com/2009/air%e4%b8%ad%e9%80%9a%e8%bf%87%e5%8f%b3%e9%94%ae%e7%9b%b4%e6%8e%a5%e9%80%89%e5%ae%9a%e5%9f%ba%e4%ba%8elist%e5%ae%b9%e5%99%a8datagrid-list-tree%e7%ad%89%e7%9a%84%e6%95%b0%e6%8d%ae-select-list-ite/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
	</channel>
</rss>

