Update
This commit is contained in:
@@ -0,0 +1,460 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>MGPickerMenu Command</title>
|
||||
<meta name="generator" content="Help & Manual" />
|
||||
<meta name="keywords" content="API,menu,MGPickerMenu command" />
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
|
||||
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
|
||||
<link type="text/css" href="default.css" rel="stylesheet" />
|
||||
<style type="text/css">
|
||||
body { margin: 0px; background: #F8F8F8; }
|
||||
</style>
|
||||
<script type="text/javascript" src="jquery.js"></script>
|
||||
<script type="text/javascript" src="helpman_settings.js"></script>
|
||||
<script type="text/javascript" src="helpman_topicinit.js"></script>
|
||||
|
||||
<script type="text/javascript">
|
||||
HMSyncTOC("index.html", "mgpickermenu.htm");
|
||||
</script>
|
||||
<script type="text/javascript" src="highlight.js"></script>
|
||||
<script type="text/javascript">
|
||||
$(document).ready(function(){highlight();});
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
|
||||
<table style="width:100%; border:none; border-spacing:0px; padding:0px; background:#D0D0D0">
|
||||
<tr style="vertical-align:middle">
|
||||
<td style="text-align:right">
|
||||
<a href="welcome.htm"><img border="0" src="../common/images/MGtoolsHelp_Home.gif" width="34" height="22" alt="Home" /></a>
|
||||
<a href="mgpickerlink.htm"><img border="0" src="../common/images/MGtoolsHelp_previous.gif" width="34" height="22" alt="Previous" /></a>
|
||||
<a href="mgpickermenuitem.htm"><img border="0" src="../common/images/MGtoolsHelp_next.gif" width="34" height="22" alt="Next" /></a>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
|
||||
<!-- Placeholder for topic body. -->
|
||||
<table style="width:100%;border:none;border-spacing:0px"><tr style="vertical-align:top"><td style="text-align:left;padding:5px">
|
||||
<div style="text-align: left; text-indent: 0; padding: 0 0 0 0; margin: 0 0 0 0;"><table style="width:100%; border:none; border-spacing:2px;">
|
||||
<tr>
|
||||
<td style="vertical-align:middle; height:8px; padding:1px; border:none"><p><span style="font-family: 'Times New Roman',Times,Georgia,serif; font-weight: bold;">命令</span><span style="font-family: 'Times New Roman',Times,Georgia,serif;"> (MEL/Python)</span></p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="vertical-align:middle; height:48px; padding:1px; border:none"><h1 class="p_Heading1" style="margin: 19px 0 19px 0;"><span class="f_Heading1" style="font-size: 24pt; font-family: 'Times New Roman',Times,Georgia,serif;">MGPickerMenu</span></h1>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<p class="p_Normal" style="margin: 14px 0 0 0;"><span style="font-family: 'Times New Roman',Times,Georgia,serif;">跳转到: </span><span style="font-size: 12pt; font-family: 'Times New Roman',Times,Georgia,serif;"><a href="mgpickermenu.htm#synopsis" class="topiclink">概要</a>. <a href="mgpickermenu.htm#examples" class="topiclink">MEL例子</a>. <a href="mgpickermenu.htm#pyexamples" class="topiclink">Python例子</a>.</span></p>
|
||||
<p class="p_Normal" style="margin: 19px 0 0 0;"><a id="synopsis" class="hmanchor"></a><span style="font-size: 14pt; font-family: 'Times New Roman',Times,Georgia,serif; font-weight: bold;">概要</span></p>
|
||||
<p class="p_Normal" style="margin: 19px 0 0 0;"><span style="font-family: 'Courier New',Courier,monospace;">MGPickerMenu (menuIDString, [<a href="mgpickermenu.htm#addmenuitem" class="topiclink">addMenuItem</a>=</span><span style="font-family: 'Courier New',Courier,monospace; font-style: italic;">(string, string, string, string, string)</span><span style="font-family: 'Courier New',Courier,monospace;">], [<a href="https://www.helpandmanual.com/order.html" class="topiclink">copyMenu</a>=</span><span style="font-family: 'Courier New',Courier,monospace; font-style: italic;">boolean</span><span style="font-family: 'Courier New',Courier,monospace;">], [<a href="mgpickermenu.htm#copypairedmenu" class="topiclink">copyPairedMenu</a>=</span><span style="font-family: 'Courier New',Courier,monospace; font-style: italic;">boolean</span><span style="font-family: 'Courier New',Courier,monospace;">], [<a href="mgpickermenu.htm#deleteallitems" class="topiclink">deleteAllItems</a>=</span><span style="font-family: 'Courier New',Courier,monospace; font-style: italic;">boolean</span><span style="font-family: 'Courier New',Courier,monospace;">], [<a href="mgpickermenu.htm#exist" class="topiclink">exist</a>=</span><span style="font-family: 'Courier New',Courier,monospace; font-style: italic;">boolean</span><span style="font-family: 'Courier New',Courier,monospace;">], [<a href="mgpickermenu.htm#itemarray" class="topiclink">itemArray</a>=</span><span style="font-family: 'Courier New',Courier,monospace; font-style: italic;">boolean</span><span style="font-family: 'Courier New',Courier,monospace;">], [<a href="mgpickermenu.htm#insertmenuitem" class="topiclink">insertMenuItem</a>=(int, </span><span style="font-family: 'Courier New',Courier,monospace; font-style: italic;">string, string, string, string, string)</span><span style="font-family: 'Courier New',Courier,monospace;">], [<a href="mgpickermenu.htm#mode" class="topiclink">mode</a>=</span><span style="font-family: 'Courier New',Courier,monospace; font-style: italic;">string</span><span style="font-family: 'Courier New',Courier,monospace;">], [<a href="mgpickermenu.htm#menuitem" class="topiclink">menuItem</a>=</span><span style="font-family: 'Courier New',Courier,monospace; font-style: italic;">int</span><span style="font-family: 'Courier New',Courier,monospace;">], [<a href="mgpickermenu.htm#markingmenu" class="topiclink">markingMenu</a>=</span><span style="font-family: 'Courier New',Courier,monospace; font-style: italic;">boolean</span><span style="font-family: 'Courier New',Courier,monospace;">],[<a href="mgpickermenu.htm#numberofitems" class="topiclink">numberOfItems</a>=</span><span style="font-family: 'Courier New',Courier,monospace; font-style: italic;">boolean</span><span style="font-family: 'Courier New',Courier,monospace;">],[<a href="mgpickermenu.htm#parent" class="topiclink">parent</a>=</span><span style="font-family: 'Courier New',Courier,monospace; font-style: italic;">string</span><span style="font-family: 'Courier New',Courier,monospace;">],[<a href="mgpickermenu.htm#popoutsidebbox" class="topiclink">popOutsideBBox</a>=</span><span style="font-family: 'Courier New',Courier,monospace; font-style: italic;">boolean</span><span style="font-family: 'Courier New',Courier,monospace;">], [<a href="mgpickermenu.htm#userightmenu" class="topiclink">useRightMenu</a>=</span><span style="font-family: 'Courier New',Courier,monospace; font-style: italic;">boolean</span><span style="font-family: 'Courier New',Courier,monospace;">], [<a href="mgpickermenu.htm#view" class="topiclink">view</a>=</span><span style="font-family: 'Courier New',Courier,monospace; font-style: italic;">string</span><span style="font-family: 'Courier New',Courier,monospace;">])</span></p>
|
||||
<p class="p_Normal" style="margin: 14px 0 14px 0;"><span style="font-size: 12pt; font-family: 'Times New Roman',Times,Georgia,serif;">MGPickerMenu </span><span style="font-size: 11pt; font-family: 'Times New Roman',Times,Georgia,serif; font-weight: bold;">不可撤消</span><span style="font-size: 11pt; font-family: 'Times New Roman',Times,Georgia,serif;">, 可以查询且可以编辑</span><span style="font-size: 11pt; font-family: 'Times New Roman',Times,Georgia,serif;">。</span></p>
|
||||
<p style="line-height: 1.80;"><span style="font-size: 11pt; font-family: 'Times New Roman',Times,Georgia,serif;">你不需要创建菜单,因为对于每一个picker对象来讲,已经有左键右键菜单(只是初始是空的,看起来像没有),你需要做的只是查询和编辑它。</span></p>
|
||||
<p style="line-height: 1.80;"><span style="font-size: 11pt; font-family: 'Times New Roman',Times,Georgia,serif;">你仍可在创建模式下使用该命令,不过它只是帮你获取相应的菜单id罢了。</span></p>
|
||||
<p style="line-height: 1.80;"><span style="font-size: 11pt; font-family: 'Times New Roman',Times,Georgia,serif;">在查询和编辑模式下,一定要提供菜单id。菜单id的格式是这样的:</span></p>
|
||||
<p style="line-height: 1.80;"><span style="width:48px;display:inline-block"> </span><span style="font-size: 11pt; font-family: 'Times New Roman',Times,Georgia,serif;">commandButton1.rightmenu //Picker按钮"commandButton1"的右键菜单的id.</span></p>
|
||||
<p style="line-height: 1.80;"><span style="width:48px;display:inline-block"> </span><span style="font-size: 11pt; font-family: 'Times New Roman',Times,Georgia,serif;">selectButton1.leftmenu //Picker按钮"commandButton1"的左键菜单的id.</span></p>
|
||||
<p style="line-height: 1.38;"><span style="color: #000000;"> </span></p>
|
||||
<p style="line-height: 1.38;"><span style="font-size: 11pt; font-family: 'Times New Roman',Times,Georgia,serif;">在编辑模式下,一些编辑性的flag会互相排斥,只会执行第一个就返回结果。</span></p>
|
||||
<p class="p_Normal"> </p>
|
||||
<div style="text-align: left; text-indent: 0; padding: 0 0 0 0; margin: 0 0 0 0;"><table style="width:100%; border:none; border-spacing:2px;">
|
||||
<tr>
|
||||
<td style="vertical-align:bottom; background-color:#CCCCCC; padding:1px; border:none"><p><span style="font-family: 'Times New Roman',Times,Georgia,serif; font-weight: bold;">长名 (短名)</span></p>
|
||||
</td>
|
||||
<td style="vertical-align:bottom; background-color:#CCCCCC; padding:1px; border:none"><p><span style="font-family: 'Times New Roman',Times,Georgia,serif; font-style: italic; font-weight: bold;">参数类型</span></p>
|
||||
</td>
|
||||
<td style="vertical-align:bottom; background-color:#CCCCCC; padding:1px; border:none"><p><span style="font-family: 'Times New Roman',Times,Georgia,serif; font-weight: bold;">属性</span></p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="vertical-align:top; background-color:#EEEEEE; padding:1px; border:none"><p><a id="addmenuitem" class="hmanchor"></a><span style="font-family: 'Courier New',Courier,monospace; font-weight: bold;">-addMenuItem</span><span style="font-family: 'Courier New',Courier,monospace;">(</span><span style="font-family: 'Courier New',Courier,monospace; font-weight: bold;">-ami</span><span style="font-family: 'Courier New',Courier,monospace;">)</span></p>
|
||||
</td>
|
||||
<td style="vertical-align:top; background-color:#EEEEEE; padding:1px; border:none"><p><span style="font-family: 'Courier New',Courier,monospace; font-style: italic;">string string string script string</span></p>
|
||||
</td>
|
||||
<td style="vertical-align:top; background-color:#EEEEEE; padding:1px; border:none"><p><img alt="create" title="create" width="13" height="16" style="margin:2px 2px 2px 2px;width:13px;height:16px;border:none" src="create.gif"/><img alt="edit" title="edit" width="13" height="16" style="margin:2px 2px 2px 2px;width:13px;height:16px;border:none" src="edit.gif"/></p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="3" style="vertical-align:middle; padding:1px; border:none"><div style="text-align: left; text-indent: 0; padding: 0 0 0 0; margin: 0 0 0 0;"><table style="width:100%; border:none; border-spacing:2px;">
|
||||
<tr>
|
||||
<td style="vertical-align:top; width:40px; padding:1px; border:none"><br />
|
||||
</td>
|
||||
<td style="vertical-align:middle; width:943px; padding:1px; border:none"><p style="line-height: 1.38;"><span style="font-size: 11pt; font-family: 'Times New Roman',Times,Georgia,serif;">只能用于编辑模式或创建模式,添加一个子菜单项。需要指定标签,图标路径,命令语言("mel" 或 "python"), 命令 及 marking菜单的方向 ("N", "NW", "W", "SW", "S", "SE", "E" or "NE").</span></p>
|
||||
<p style="line-height: 1.38;"><span style="font-size: 11pt; font-family: 'Times New Roman',Times,Georgia,serif;">* 要注意的是,即使该标签被用在创建模式,它返回的也是新加入的子菜单的id,而不是菜单本身的id。</span></p>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="vertical-align:top; background-color:#EEEEEE; padding:1px; border:none"><p><a id="copymenu" class="hmanchor"></a><span style="font-family: 'Courier New',Courier,monospace; font-weight: bold;">-copyMenu</span><span style="font-family: 'Courier New',Courier,monospace;">(</span><span style="font-family: 'Courier New',Courier,monospace; font-weight: bold;">-cm</span><span style="font-family: 'Courier New',Courier,monospace;">)</span></p>
|
||||
</td>
|
||||
<td style="vertical-align:top; background-color:#EEEEEE; padding:1px; border:none"><p><span style="font-family: 'Courier New',Courier,monospace; font-style: italic;">string</span></p>
|
||||
</td>
|
||||
<td style="vertical-align:top; background-color:#EEEEEE; padding:1px; border:none"><p><img alt="create" title="create" width="13" height="16" style="margin:2px 2px 2px 2px;width:13px;height:16px;border:none" src="create.gif"/><img alt="edit" title="edit" width="13" height="16" style="margin:2px 2px 2px 2px;width:13px;height:16px;border:none" src="edit.gif"/></p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="3" style="vertical-align:middle; padding:1px; border:none"><div style="text-align: left; text-indent: 0; padding: 0 0 0 0; margin: 0 0 0 0;"><table style="width:100%; border:none; border-spacing:2px;">
|
||||
<tr>
|
||||
<td style="vertical-align:top; width:40px; padding:1px; border:none"><br />
|
||||
</td>
|
||||
<td style="vertical-align:middle; width:943px; padding:1px; border:none"><p style="line-height: 1.38;"><span style="font-size: 11pt; font-family: 'Times New Roman',Times,Georgia,serif;">只能用于编辑模式,用来从指定菜单id中复制所有内容到该菜单中。</span></p>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="vertical-align:top; background-color:#EEEEEE; padding:1px; border:none"><p><a id="copypairedmenu" class="hmanchor"></a><span style="font-family: 'Courier New',Courier,monospace; font-weight: bold;">-copyPairedMenu</span><span style="font-family: 'Courier New',Courier,monospace;">(</span><span style="font-family: 'Courier New',Courier,monospace; font-weight: bold;">-cpm</span><span style="font-family: 'Courier New',Courier,monospace;">)</span></p>
|
||||
</td>
|
||||
<td style="vertical-align:top; background-color:#EEEEEE; padding:1px; border:none"><br />
|
||||
</td>
|
||||
<td style="vertical-align:top; background-color:#EEEEEE; padding:1px; border:none"><p><img alt="create" title="create" width="13" height="16" style="margin:2px 2px 2px 2px;width:13px;height:16px;border:none" src="create.gif"/><img alt="edit" title="edit" width="13" height="16" style="margin:2px 2px 2px 2px;width:13px;height:16px;border:none" src="edit.gif"/></p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="3" style="vertical-align:middle; padding:1px; border:none"><div style="text-align: left; text-indent: 0; padding: 0 0 0 0; margin: 0 0 0 0;"><table style="width:100%; border:none; border-spacing:2px;">
|
||||
<tr>
|
||||
<td style="vertical-align:top; width:40px; padding:1px; border:none"><br />
|
||||
</td>
|
||||
<td style="vertical-align:middle; width:943px; padding:1px; border:none"><p style="line-height: 1.38;"><span style="font-size: 11pt; font-family: 'Times New Roman',Times,Georgia,serif;">只能用于编辑模式,用来从成对的菜单中复制所有内容到该菜单中。如从左键菜单复制内容到右键菜单,从右键菜单中复制内容到左键菜单。</span></p>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="vertical-align:top; background-color:#EEEEEE; padding:1px; border:none"><p><a id="deleteallitems" class="hmanchor"></a><span style="font-family: 'Courier New',Courier,monospace; font-weight: bold;">-deleteAllItems</span><span style="font-family: 'Courier New',Courier,monospace;">(</span><span style="font-family: 'Courier New',Courier,monospace; font-weight: bold;">-dai</span><span style="font-family: 'Courier New',Courier,monospace;">)</span></p>
|
||||
</td>
|
||||
<td style="vertical-align:top; background-color:#EEEEEE; padding:1px; border:none"><br />
|
||||
</td>
|
||||
<td style="vertical-align:top; background-color:#EEEEEE; padding:1px; border:none"><p><img alt="create" title="create" width="13" height="16" style="margin:2px 2px 2px 2px;width:13px;height:16px;border:none" src="create.gif"/><img alt="edit" title="edit" width="13" height="16" style="margin:2px 2px 2px 2px;width:13px;height:16px;border:none" src="edit.gif"/></p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="3" style="vertical-align:middle; padding:1px; border:none"><div style="text-align: left; text-indent: 0; padding: 0 0 0 0; margin: 0 0 0 0;"><table style="width:100%; border:none; border-spacing:2px;">
|
||||
<tr>
|
||||
<td style="vertical-align:top; width:40px; padding:1px; border:none"><br />
|
||||
</td>
|
||||
<td style="vertical-align:middle; width:943px; padding:1px; border:none"><p style="line-height: 1.38;"><span style="font-size: 11pt; font-family: 'Times New Roman',Times,Georgia,serif;">只能用于编辑模式,清空菜单的内容。</span></p>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="vertical-align:top; background-color:#EEEEEE; padding:1px; border:none"><p><a id="exist" class="hmanchor"></a><span style="font-family: 'Courier New',Courier,monospace; font-weight: bold;">-exist</span><span style="font-family: 'Courier New',Courier,monospace;">(</span><span style="font-family: 'Courier New',Courier,monospace; font-weight: bold;">-ex</span><span style="font-family: 'Courier New',Courier,monospace;">)</span></p>
|
||||
</td>
|
||||
<td style="vertical-align:top; background-color:#EEEEEE; padding:1px; border:none"><br />
|
||||
</td>
|
||||
<td style="vertical-align:top; background-color:#EEEEEE; padding:1px; border:none"><p><img alt="query" title="query" width="13" height="16" style="margin:2px 2px 2px 2px;width:13px;height:16px;border:none" src="query.gif"/></p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="3" style="vertical-align:middle; padding:1px; border:none"><div style="text-align: left; text-indent: 0; padding: 0 0 0 0; margin: 0 0 0 0;"><table style="width:100%; border:none; border-spacing:2px;">
|
||||
<tr>
|
||||
<td style="vertical-align:top; width:40px; padding:1px; border:none"><p style="line-height: 1.38;"><span style="color: #000000;"> </span></p>
|
||||
</td>
|
||||
<td style="vertical-align:middle; width:943px; padding:1px; border:none"><p style="line-height: 1.38;"><span style="font-size: 11pt; font-family: 'Times New Roman',Times,Georgia,serif;">只能用于查询模式, 是否菜单id存在。</span></p>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="vertical-align:top; background-color:#EEEEEE; padding:1px; border:none"><p><a id="itemarray" class="hmanchor"></a><span style="font-family: 'Courier New',Courier,monospace; font-weight: bold;">-itemArray</span><span style="font-family: 'Courier New',Courier,monospace;">(</span><span style="font-family: 'Courier New',Courier,monospace; font-weight: bold;">-ia</span><span style="font-family: 'Courier New',Courier,monospace;">)</span></p>
|
||||
</td>
|
||||
<td style="vertical-align:top; background-color:#EEEEEE; padding:1px; border:none"><br />
|
||||
</td>
|
||||
<td style="vertical-align:top; background-color:#EEEEEE; padding:1px; border:none"><p><img alt="query" title="query" width="13" height="16" style="margin:2px 2px 2px 2px;width:13px;height:16px;border:none" src="query.gif"/></p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="3" style="vertical-align:middle; padding:1px; border:none"><div style="text-align: left; text-indent: 0; padding: 0 0 0 0; margin: 0 0 0 0;"><table style="width:100%; border:none; border-spacing:2px;">
|
||||
<tr>
|
||||
<td style="vertical-align:top; width:40px; padding:1px; border:none"><p style="line-height: 1.38;"><span style="color: #000000;"> </span></p>
|
||||
</td>
|
||||
<td style="vertical-align:middle; width:943px; padding:1px; border:none"><p style="line-height: 1.38;"><span style="font-size: 11pt; font-family: 'Times New Roman',Times,Georgia,serif;">只能用于查询模式, 返回所有子菜单的id字符窜数组。</span></p>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="vertical-align:top; background-color:#EEEEEE; padding:1px; border:none"><p><a id="insertmenuitem" class="hmanchor"></a><span style="font-family: 'Courier New',Courier,monospace; font-weight: bold;">-insertMenuItem</span><span style="font-family: 'Courier New',Courier,monospace;">(</span><span style="font-family: 'Courier New',Courier,monospace; font-weight: bold;">-imi</span><span style="font-family: 'Courier New',Courier,monospace;">)</span></p>
|
||||
</td>
|
||||
<td style="vertical-align:top; background-color:#EEEEEE; padding:1px; border:none"><p><span style="font-family: 'Courier New',Courier,monospace; font-style: italic;">int string string string script string</span></p>
|
||||
</td>
|
||||
<td style="vertical-align:top; background-color:#EEEEEE; padding:1px; border:none"><p><img alt="create" title="create" width="13" height="16" style="margin:2px 2px 2px 2px;width:13px;height:16px;border:none" src="create.gif"/><img alt="edit" title="edit" width="13" height="16" style="margin:2px 2px 2px 2px;width:13px;height:16px;border:none" src="edit.gif"/></p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="3" style="vertical-align:middle; padding:1px; border:none"><div style="text-align: left; text-indent: 0; padding: 0 0 0 0; margin: 0 0 0 0;"><table style="width:100%; border:none; border-spacing:2px;">
|
||||
<tr>
|
||||
<td style="vertical-align:top; width:40px; padding:1px; border:none"><p style="line-height: 1.38;"><span style="color: #000000;"> </span></p>
|
||||
</td>
|
||||
<td style="vertical-align:middle; width:943px; padding:1px; border:none"><p style="line-height: 1.38;"><span style="font-size: 11pt; font-family: 'Times New Roman',Times,Georgia,serif;">只能用于编辑模式或创建模式,用来在特定的索引处插入一个子菜单项。需要指定索引,标签,图标路径,命令语言("mel" 或 "python"), 命令 及 marking菜单的方向 ("N", "NW", "W", "SW", "S", "SE", "E" or "NE").</span></p>
|
||||
<p style="line-height: 1.38;"><span style="font-size: 11pt; font-family: 'Times New Roman',Times,Georgia,serif;">* 要注意的是,即使该标签被用在创建模式,它返回的也是新加入的子菜单的id,而不是菜单本身的id。</span></p>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="vertical-align:top; background-color:#EEEEEE; padding:1px; border:none"><p><a id="mode" class="hmanchor"></a><span style="font-family: 'Courier New',Courier,monospace; font-weight: bold;">-mode</span><span style="font-family: 'Courier New',Courier,monospace;">(</span><span style="font-family: 'Courier New',Courier,monospace; font-weight: bold;">-m</span><span style="font-family: 'Courier New',Courier,monospace;">)</span></p>
|
||||
</td>
|
||||
<td style="vertical-align:top; background-color:#EEEEEE; padding:1px; border:none"><p class="p_Normal"><span style="font-family: 'Courier New',Courier,monospace; font-style: italic;">string</span></p>
|
||||
</td>
|
||||
<td style="vertical-align:top; background-color:#EEEEEE; padding:1px; border:none"><p><img alt="create" title="create" width="13" height="16" style="margin:2px 2px 2px 2px;width:13px;height:16px;border:none" src="create.gif"/><img alt="query" title="query" width="13" height="16" style="margin:2px 2px 2px 2px;width:13px;height:16px;border:none" src="query.gif"/></p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="3" style="vertical-align:middle; padding:1px; border:none"><div style="text-align: left; text-indent: 0; padding: 0 0 0 0; margin: 0 0 0 0;"><table style="width:100%; border:none; border-spacing:2px;">
|
||||
<tr>
|
||||
<td style="vertical-align:top; width:40px; padding:1px; border:none"><p style="line-height: 1.38;"><span style="color: #000000;"> </span></p>
|
||||
</td>
|
||||
<td style="vertical-align:middle; width:943px; padding:1px; border:none"><p style="line-height: 1.38;"><span style="font-size: 11pt; font-family: 'Times New Roman',Times,Georgia,serif;">在查询模式下返回该菜单id属性右键还是左键菜单。在创建模式下,这个标签是必须的,用来指定你要获取的是右键的还是左键菜单id。(创建模式下-parent标签也是必须的)</span></p>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="vertical-align:top; background-color:#EEEEEE; padding:1px; border:none"><p><a id="menuitem" class="hmanchor"></a><span style="font-family: 'Courier New',Courier,monospace; font-weight: bold;">-menuItem</span><span style="font-family: 'Courier New',Courier,monospace;">(</span><span style="font-family: 'Courier New',Courier,monospace; font-weight: bold;">-mi</span><span style="font-family: 'Courier New',Courier,monospace;">)</span></p>
|
||||
</td>
|
||||
<td style="vertical-align:top; background-color:#EEEEEE; padding:1px; border:none"><p><span style="font-family: 'Courier New',Courier,monospace; font-style: italic;">int</span></p>
|
||||
</td>
|
||||
<td style="vertical-align:top; background-color:#EEEEEE; padding:1px; border:none"><p><img alt="query" title="query" width="13" height="16" style="margin:2px 2px 2px 2px;width:13px;height:16px;border:none" src="query.gif"/></p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="3" style="vertical-align:middle; padding:1px; border:none"><div style="text-align: left; text-indent: 0; padding: 0 0 0 0; margin: 0 0 0 0;"><table style="width:100%; border:none; border-spacing:2px;">
|
||||
<tr>
|
||||
<td style="vertical-align:top; width:40px; padding:1px; border:none"><p style="line-height: 1.38;"><span style="color: #000000;"> </span></p>
|
||||
</td>
|
||||
<td style="vertical-align:middle; width:943px; padding:1px; border:none"><p style="line-height: 1.38;"><span style="font-size: 11pt; font-family: 'Times New Roman',Times,Georgia,serif;">只能用于查询模式, 返回在特定索引值的子菜单的id字符窜。</span></p>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="vertical-align:top; background-color:#EEEEEE; padding:1px; border:none"><p><a id="markingmenu" class="hmanchor"></a><span style="font-family: 'Courier New',Courier,monospace; font-weight: bold;">-markingMenu</span><span style="font-family: 'Courier New',Courier,monospace;">(</span><span style="font-family: 'Courier New',Courier,monospace; font-weight: bold;">-mm</span><span style="font-family: 'Courier New',Courier,monospace;">)</span></p>
|
||||
</td>
|
||||
<td style="vertical-align:top; background-color:#EEEEEE; padding:1px; border:none"><p><span style="font-family: 'Courier New',Courier,monospace; font-style: italic;">boolean</span></p>
|
||||
</td>
|
||||
<td style="vertical-align:top; background-color:#EEEEEE; padding:1px; border:none"><p><img alt="create" title="create" width="13" height="16" style="margin:2px 2px 2px 2px;width:13px;height:16px;border:none" src="create.gif"/><img alt="query" title="query" width="13" height="16" style="margin:2px 2px 2px 2px;width:13px;height:16px;border:none" src="query.gif"/><img alt="edit" title="edit" width="13" height="16" style="margin:2px 2px 2px 2px;width:13px;height:16px;border:none" src="edit.gif"/></p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="3" style="vertical-align:middle; padding:1px; border:none"><div style="text-align: left; text-indent: 0; padding: 0 0 0 0; margin: 0 0 0 0;"><table style="width:100%; border:none; border-spacing:2px;">
|
||||
<tr>
|
||||
<td style="vertical-align:top; width:40px; padding:1px; border:none"><p style="line-height: 1.38;"><span style="color: #000000;"> </span></p>
|
||||
</td>
|
||||
<td style="vertical-align:middle; width:942px; padding:1px; border:none"><p style="line-height: 1.38;"><span style="font-size: 11pt; font-family: 'Times New Roman',Times,Georgia,serif;">查询或编辑菜单是否是一个marking menu。</span></p>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="vertical-align:top; background-color:#EEEEEE; padding:1px; border:none"><p><a id="numberofitems" class="hmanchor"></a><span style="font-family: 'Courier New',Courier,monospace; font-weight: bold;">-numberOfItems</span><span style="font-family: 'Courier New',Courier,monospace;">(</span><span style="font-family: 'Courier New',Courier,monospace; font-weight: bold;">-ni</span><span style="font-family: 'Courier New',Courier,monospace;">)</span></p>
|
||||
</td>
|
||||
<td style="vertical-align:top; background-color:#EEEEEE; padding:1px; border:none"><div style="text-align: left; text-indent: 0; padding: 0 0 0 0; margin: 0 0 0 0;"><table style="width:100%; border:none; border-spacing:2px;">
|
||||
<tr>
|
||||
<td style="vertical-align:top; background-color:#EEEEEE; padding:1px; border:none"><p><span style="color: #000000;"> </span></p>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</td>
|
||||
<td style="vertical-align:top; background-color:#EEEEEE; padding:1px; border:none"><p><img alt="query" title="query" width="13" height="16" style="margin:2px 2px 2px 2px;width:13px;height:16px;border:none" src="query.gif"/></p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="3" style="vertical-align:middle; padding:1px; border:none"><div style="text-align: left; text-indent: 0; padding: 0 0 0 0; margin: 0 0 0 0;"><table style="width:100%; border:none; border-spacing:2px;">
|
||||
<tr>
|
||||
<td style="vertical-align:top; width:40px; padding:1px; border:none"><p style="line-height: 1.38;"><span style="color: #000000;"> </span></p>
|
||||
</td>
|
||||
<td style="vertical-align:middle; width:943px; padding:1px; border:none"><p style="line-height: 1.38;"><span style="font-size: 11pt; font-family: 'Times New Roman',Times,Georgia,serif;">查询子菜单的数目。</span></p>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="vertical-align:top; background-color:#EEEEEE; padding:1px; border:none"><p><a id="parent" class="hmanchor"></a><span style="font-family: 'Courier New',Courier,monospace; font-weight: bold;">-parent</span><span style="font-family: 'Courier New',Courier,monospace;">(</span><span style="font-family: 'Courier New',Courier,monospace; font-weight: bold;">-p</span><span style="font-family: 'Courier New',Courier,monospace;">)</span></p>
|
||||
</td>
|
||||
<td style="vertical-align:top; background-color:#EEEEEE; padding:1px; border:none"><p><span style="font-family: 'Courier New',Courier,monospace; font-style: italic;">string</span></p>
|
||||
</td>
|
||||
<td style="vertical-align:top; background-color:#EEEEEE; padding:1px; border:none"><p><img alt="create" title="create" width="13" height="16" style="margin:2px 2px 2px 2px;width:13px;height:16px;border:none" src="create.gif"/><img alt="query" title="query" width="13" height="16" style="margin:2px 2px 2px 2px;width:13px;height:16px;border:none" src="query.gif"/></p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="3" style="vertical-align:middle; padding:1px; border:none"><div style="text-align: left; text-indent: 0; padding: 0 0 0 0; margin: 0 0 0 0;"><table style="width:100%; border:none; border-spacing:2px;">
|
||||
<tr>
|
||||
<td style="vertical-align:top; width:40px; padding:1px; border:none"><p style="line-height: 1.38;"><span style="color: #000000;"> </span></p>
|
||||
</td>
|
||||
<td style="vertical-align:middle; width:943px; padding:1px; border:none"><p style="line-height: 1.38;"><span style="font-size: 11pt; font-family: 'Times New Roman',Times,Georgia,serif;">在查询模式下返回该菜单所属的picker对象id。在创建模式下,这个标签是必须的,用来指定你要获取的是哪个picker对象的菜单id。(创建模式下-mode 标签也是必须的)</span></p>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="vertical-align:top; background-color:#EEEEEE; padding:1px; border:none"><p><a id="popoutsidebbox" class="hmanchor"></a><span style="font-family: 'Courier New',Courier,monospace; font-weight: bold;">-popOutsideBBox</span><span style="font-family: 'Courier New',Courier,monospace;">(</span><span style="font-family: 'Courier New',Courier,monospace; font-weight: bold;">-pob</span><span style="font-family: 'Courier New',Courier,monospace;">) </span><img alt="v2_transparent" width="34" height="12" style="margin:0;width:34px;height:12px;border:none" src="v2_transparent.png"/></p>
|
||||
</td>
|
||||
<td style="vertical-align:top; background-color:#EEEEEE; padding:1px; border:none"><p><span style="font-family: 'Courier New',Courier,monospace; font-style: italic;">boolean</span></p>
|
||||
</td>
|
||||
<td style="vertical-align:top; background-color:#EEEEEE; padding:1px; border:none"><p><img alt="create" title="create" width="13" height="16" style="margin:2px 2px 2px 2px;width:13px;height:16px;border:none" src="create.gif"/><img alt="query" title="query" width="13" height="16" style="margin:2px 2px 2px 2px;width:13px;height:16px;border:none" src="query.gif"/><img alt="edit" title="edit" width="13" height="16" style="margin:2px 2px 2px 2px;width:13px;height:16px;border:none" src="edit.gif"/></p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="3" style="vertical-align:middle; padding:1px; border:none"><div style="text-align: left; text-indent: 0; padding: 0 0 0 0; margin: 0 0 0 0;"><table style="width:100%; border:none; border-spacing:2px;">
|
||||
<tr>
|
||||
<td style="vertical-align:top; width:40px; padding:1px; border:none"><p style="line-height: 1.38;"><span style="color: #000000;"> </span></p>
|
||||
</td>
|
||||
<td style="vertical-align:middle; width:943px; padding:1px; border:none"><p style="line-height: 1.38;"><span style="font-size: 11pt; font-family: 'Times New Roman',Times,Georgia,serif;">决定菜单是在鼠标点击处弹出,还是在对象的形状矩形框外弹出。比如你把一个命令按钮作为菜单栏的菜单,点击时你会希望菜单在命令按钮下方弹出而不是在鼠标点击处。</span></p>
|
||||
<p style="line-height: 1.38;"><span style="font-size: 11pt; font-family: 'Times New Roman',Times,Georgia,serif;">默认值为False, 即在鼠标点击处弹出菜单。</span></p>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="vertical-align:top; background-color:#EEEEEE; padding:1px; border:none"><p><a id="userightmenu" class="hmanchor"></a><span style="font-family: 'Courier New',Courier,monospace; font-weight: bold;">-useRightMenu</span><span style="font-family: 'Courier New',Courier,monospace;">(</span><span style="font-family: 'Courier New',Courier,monospace; font-weight: bold;">-urm</span><span style="font-family: 'Courier New',Courier,monospace;">)</span></p>
|
||||
</td>
|
||||
<td style="vertical-align:top; background-color:#EEEEEE; padding:1px; border:none"><p><span style="font-family: 'Courier New',Courier,monospace; font-style: italic;">boolean</span></p>
|
||||
</td>
|
||||
<td style="vertical-align:top; background-color:#EEEEEE; padding:1px; border:none"><p><img alt="create" title="create" width="13" height="16" style="margin:2px 2px 2px 2px;width:13px;height:16px;border:none" src="create.gif"/><img alt="query" title="query" width="13" height="16" style="margin:2px 2px 2px 2px;width:13px;height:16px;border:none" src="query.gif"/><img alt="edit" title="edit" width="13" height="16" style="margin:2px 2px 2px 2px;width:13px;height:16px;border:none" src="edit.gif"/></p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="3" style="vertical-align:middle; padding:1px; border:none"><div style="text-align: left; text-indent: 0; padding: 0 0 0 0; margin: 0 0 0 0;"><table style="width:100%; border:none; border-spacing:2px;">
|
||||
<tr>
|
||||
<td style="vertical-align:top; width:40px; padding:1px; border:none"><p style="line-height: 1.38;"><span style="color: #000000;"> </span></p>
|
||||
</td>
|
||||
<td style="vertical-align:middle; width:943px; padding:1px; border:none"><p style="line-height: 1.38;"><span style="font-size: 11pt; font-family: 'Times New Roman',Times,Georgia,serif;">决定是否左键菜单要完全使用右键菜单的内容。对于本来就是右键菜单则编辑无效,因为右键菜单的这个值永远是true。</span></p>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="vertical-align:top; background-color:#EEEEEE; padding:1px; border:none"><p><a id="view" class="hmanchor"></a><span style="font-family: 'Courier New',Courier,monospace; font-weight: bold;">-view</span><span style="font-family: 'Courier New',Courier,monospace;">(</span><span style="font-family: 'Courier New',Courier,monospace; font-weight: bold;">-v</span><span style="font-family: 'Courier New',Courier,monospace;">)</span></p>
|
||||
</td>
|
||||
<td style="vertical-align:top; background-color:#EEEEEE; padding:1px; border:none"><p><span style="font-family: 'Courier New',Courier,monospace; font-style: italic;">string</span></p>
|
||||
</td>
|
||||
<td style="vertical-align:top; background-color:#EEEEEE; padding:1px; border:none"><p><img alt="create" title="create" width="13" height="16" style="margin:2px 2px 2px 2px;width:13px;height:16px;border:none" src="create.gif"/><img alt="query" title="query" width="13" height="16" style="margin:2px 2px 2px 2px;width:13px;height:16px;border:none" src="query.gif"/><img alt="edit" title="edit" width="13" height="16" style="margin:2px 2px 2px 2px;width:13px;height:16px;border:none" src="edit.gif"/></p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="3" style="vertical-align:middle; padding:1px; border:none"><div style="text-align: left; text-indent: 0; padding: 0 0 0 0; margin: 0 0 0 0;"><table style="width:100%; border:none; border-spacing:2px;">
|
||||
<tr>
|
||||
<td style="vertical-align:top; width:40px; padding:1px; border:none"><p style="line-height: 1.38;"><span style="color: #000000;"> </span></p>
|
||||
</td>
|
||||
<td style="vertical-align:middle; width:943px; padding:1px; border:none"><p style="line-height: 1.38;"><span style="font-size: 11pt; font-family: 'Times New Roman',Times,Georgia,serif;">决定你要查询哪个picker视图的菜单。要指定一个合法的视图id。</span></p>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="vertical-align:top; padding:1px; border:none"><br />
|
||||
</td>
|
||||
<td style="vertical-align:top; padding:1px; border:none"><br />
|
||||
</td>
|
||||
<td style="vertical-align:top; padding:1px; border:none"><br />
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="vertical-align:top; padding:1px; border:none"><br />
|
||||
</td>
|
||||
<td style="vertical-align:top; padding:1px; border:none"><br />
|
||||
</td>
|
||||
<td style="vertical-align:top; padding:1px; border:none"><br />
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<hr style="height:2px; color:#CCCCCC; border-width:0; background-color:#cccccc;" /><div style="text-align: left; text-indent: 0; padding: 0 0 0 0; margin: 10px 0 0 0;"><table style="background-color:#eeeeee; border:none; border-spacing:1px;">
|
||||
<tr>
|
||||
<td style="vertical-align:top; padding:4px; border:none"><p><img alt="create" width="13" height="16" style="margin:0;width:13px;height:16px;border:none" src="create.gif"/><span class="f_ImageCaption"> </span><span style="font-size: 11pt; font-family: 宋体;">标签可以在创建模式中使用</span></p>
|
||||
</td>
|
||||
<td style="vertical-align:top; padding:4px; border:none"><p><img alt="edit" width="13" height="16" style="margin:0;width:13px;height:16px;border:none" src="edit.gif"/><span class="f_ImageCaption"> </span><span style="font-size: 11pt; font-family: 宋体;">标签可以在编辑模式中使用</span></p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="vertical-align:top; padding:4px; border:none"><p><img alt="query" width="13" height="16" style="margin:0;width:13px;height:16px;border:none" src="query.gif"/><span class="f_ImageCaption"> </span><span style="font-size: 11pt; font-family: 宋体;">标签可以在查询模式中使用</span></p>
|
||||
</td>
|
||||
<td style="vertical-align:top; padding:4px; border:none"><p><img alt="multiuse" width="13" height="16" style="margin:0;width:13px;height:16px;border:none" src="multiuse.gif"/><span class="f_ImageCaption"> </span><span style="font-size: 11pt; font-family: 宋体;">标签可以在一条命令中多次使用</span></p>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<p style="margin: 19px 0 0 0;"><a id="examples" class="hmanchor"></a><span style="font-size: 14pt; font-family: 'Times New Roman',Times,Georgia,serif; font-weight: bold;">MEL</span><span style="font-size: 14pt; font-family: 宋体; font-weight: bold;">例子</span></p>
|
||||
<p class="p_Normal" style="line-height: 1.0; white-space: nowrap; margin: 19px 0 0 0;"><span style="font-family: 'Courier New',Courier,monospace;">// You must make sure the picker item: commandButton1 is already in scene in order to test these codes.</span><br />
|
||||
<span style="font-family: 'Courier New',Courier,monospace;">// To form a picker menu id, use pickerItemId.leftmenu / pickerItemId.rightmenu</span><br />
|
||||
<span style="font-family: 'Courier New',Courier,monospace;">string $cmdButton = "commandButton1";</span><br />
|
||||
<span style="font-family: 'Courier New',Courier,monospace;">string $rightMenu = `MGPickerMenu -p $cmdButton -m "rightmenu"`; //This just retrieves the id "commandButton1.rightmenu" instead of creating it.</span><br />
|
||||
<span style="font-family: 'Courier New',Courier,monospace;"> </span><br />
|
||||
<span style="font-family: 'Courier New',Courier,monospace;">// Add / Insert a menu item:</span><br />
|
||||
<span style="font-family: 'Courier New',Courier,monospace;">string $menuItem1 = `MGPickerMenu -e -addMenuItem "First Menu Item" "/path/to/icon0.png" "mel" "print \"It works!\"" "N" $rightMenu`;</span><br />
|
||||
<span style="font-family: 'Courier New',Courier,monospace;">string $menuItem3 = `MGPickerMenu -e -addMenuItem "Third Menu Item" "/path/to/icon2.png" "python" "print 'It works!'" "S" $rightMenu`;</span><br />
|
||||
<span style="font-family: 'Courier New',Courier,monospace;">string $menuItem2 = `MGPickerMenu -e -insertMenuItem 1 "Second Menu Item" "/path/to/icon1.png" "python" "print 'It inserts!'" "E" $rightMenu`;</span></p>
|
||||
<p class="p_Normal" style="line-height: 1.0; white-space: nowrap; margin: 19px 0 0 0;"><span style="font-family: 'Courier New',Courier,monospace;">// Now you can test right click on commandButton1 using preview tool, see menu pops up!</span><br />
|
||||
<span style="font-family: 'Courier New',Courier,monospace;"> </span><br />
|
||||
<span style="font-family: 'Courier New',Courier,monospace;">// Let's continue to toggle on the marking menu state of the menu.</span><br />
|
||||
<span style="font-family: 'Courier New',Courier,monospace;">MGPickerMenu -e -markingMenu 1 $rightMenu;</span><br />
|
||||
<span style="font-family: 'Courier New',Courier,monospace;">// Now you can test right click on commandButton1 using preview tool, see marking menu pops up!</span><br />
|
||||
<span style="font-family: 'Courier New',Courier,monospace;"> </span></p>
|
||||
<p style="margin: 19px 0 0 0;"><a id="pyexamples" class="hmanchor"></a><span style="font-size: 14pt; font-family: 'Times New Roman',Times,Georgia,serif; font-weight: bold;">Python例子</span></p>
|
||||
<p style="margin: 19px 0 0 0;"><span style="font-family: 'Courier New',Courier,monospace;">from mgpicker import mgp</span></p>
|
||||
<p class="p_Normal" style="line-height: 1.0; white-space: nowrap; margin: 19px 0 0 0;"><span style="font-family: 'Courier New',Courier,monospace;"># You must make sure the picker item: commandButton1 is already in scene in order to test these codes.</span><br />
|
||||
<span style="font-family: 'Courier New',Courier,monospace;"># To form a picker menu id, use pickerItemId.leftmenu / pickerItemId.rightmenu</span><br />
|
||||
<span style="font-family: 'Courier New',Courier,monospace;">cmdButton = 'commandButton1'</span><br />
|
||||
<span style="font-family: 'Courier New',Courier,monospace;">rightMenu = mgp.MGPickerMenu(p=cmdButton, mode='rightmenu') # This just retrieves the id "commandButton1.rightmenu" instead of creating it.</span><br />
|
||||
<span style="font-family: 'Courier New',Courier,monospace;"> </span><br />
|
||||
<span style="font-family: 'Courier New',Courier,monospace;"># Add / Insert a menu item:</span><br />
|
||||
<span style="font-family: 'Courier New',Courier,monospace;">menuItem1 = mgp.MGPickerMenu(rightMenu, e=True, addMenuItem=('First Menu Item', '/path/to/icon0.png', 'mel', 'print "It works!"', 'N'))</span><br />
|
||||
<span style="font-family: 'Courier New',Courier,monospace;">menuItem3 = mgp.MGPickerMenu(rightMenu, e=True, addMenuItem=('Third Menu Item', '/path/to/icon2.png', 'python', 'print "It works!"', 'S'))</span><br />
|
||||
<span style="font-family: 'Courier New',Courier,monospace;">menuItem2 = mgp.MGPickerMenu(rightMenu, e=True, insertMenuItem=(1, 'Second Menu Item', '/path/to/icon1.png', 'python', 'print "It inserts!"', 'E'))</span></p>
|
||||
<p class="p_Normal" style="line-height: 1.0; white-space: nowrap; margin: 19px 0 0 0;"><span style="font-family: 'Courier New',Courier,monospace;"># Now you can test right click on commandButton1 using preview tool, see menu pops up!</span><br />
|
||||
<span style="font-family: 'Courier New',Courier,monospace;"> </span><br />
|
||||
<span style="font-family: 'Courier New',Courier,monospace;"># Let's continue to toggle on the marking menu state of the menu.</span><br />
|
||||
<span style="font-family: 'Courier New',Courier,monospace;">mgp.MGPickerMenu(rightMenu, e=True, markingMenu=True )</span><br />
|
||||
<span style="font-family: 'Courier New',Courier,monospace;"># Now you can test right click on commandButton1 using preview tool, see marking menu pops up!</span></p>
|
||||
|
||||
</td></tr></table>
|
||||
<table height="30" width="100%" border="0" cellspacing="" cellpadding="0" bgcolor="#D0D0D0">
|
||||
<tr valign="bottom" bgcolor="#D0D0D0" >
|
||||
<td align="left" valign="middle" >
|
||||
<a href="welcome.htm"><img border="0" src="../common/images/MGtoolsHelp_Home.gif" width="34" height="22" alt="Home" /></a>
|
||||
<a href="mgpickerlink.htm"><img border="0" src="../common/images/MGtoolsHelp_previous.gif" width="34" height="22" alt="Previous" /></a>
|
||||
<a href="mgpickermenuitem.htm"><img border="0" src="../common/images/MGtoolsHelp_next.gif" width="34" height="22" alt="Next" /></a></td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user