?? bimenu.html
字號:
<tr>
<td><code><a href="#hasChildren">hasChildren</a></code></td>
<td>Returns true if the menu has any child menu items</td>
</tr>
<tr>
<td><code><a href="#remove">remove</a></code></td>
<td>Removes an existing menu item from the component.</td>
</tr>
<tr>
<td><code><a href="#setLocation">setLocation</a></code></td>
<td>Sets the left and top position relative to the screen for the menu.</td>
</tr>
<tr>
<td><code><a href="#setSize">setSize</a></code></td>
<td>Sets the width and height of the menu.</td>
</tr>
</tbody>
</table>
<h2>Events</h2>
<table>
<thead>
<tr>
<td>Name</td>
<td>Type</td>
<td class="bubbles-header">Bubbles</td>
<td>Descripton</td>
</tr>
</thead>
<tbody>
<tr>
<td><a name="beforeshow"></a><code>beforeshow</code></td>
<td><code class="type"><code><a href="BiEvent.html">BiEvent</a></code></code></td>
<td class="bubbles-column"></td>
<td>Fires before the menu is shown.
This is a good place to change the content of the menu to reflect the
component causing the menu to be shown</td>
</tr>
<tr>
<td><a name="hide"></a><code>hide</code></td>
<td><code class="type"><code><a href="BiEvent.html">BiEvent</a></code></code></td>
<td class="bubbles-column"></td>
<td>Fires when the menu is hidden</td>
</tr>
<tr>
<td><a name="show"></a><code>show</code></td>
<td><code class="type"><code><a href="BiEvent.html">BiEvent</a></code></code></td>
<td class="bubbles-column"></td>
<td>Fires when the menu is shown</td>
</tr>
</tbody>
</table>
<h2>Static Methods</h2>
<p>None.</p>
<h2>Static Fields</h2>
<p>None.</p>
<h2>Remarks</h2>
<p>
The location of the menu is relative to the screen.<br>
<br>
A menu can only be used as a sub menu for one menu item.
</p>
<h2>Method Details</h2>
<h3><a name="add"></a>add</h3>
<p>Adds a menu item to the current menu. The added
menu item becomes a child of the current menu. If the menu item
is child of another menu it is first removed from that menu.
The second, optional, argument can be used to insert the new menu item
before an existing child.</p>
<h4>Syntax</h4>
<pre class="method-syntax">object.add(<span class="methodArgument">oChild</span> [, <span class="methodArgument">oBefore</span>])</pre>
<h4>Parameters</h4>
<table>
<thead>
<tr>
<td>Name</td>
<td>Type</td>
<td class="optional-header">Optional</td>
<td>Default</td>
<td>Descripton</td>
</tr>
</thead>
<tbody>
<tr>
<td><code class="type"><code><a href="BiMenuItem.html">BiMenuItem</a></code></code></td>
<td class="optional-column"></td>
<td></td>
<td>The menu item to add</td>
</tr>
<tr>
<td><code>oBefore</code></td>
<td><code class="type"><code><a href="BiMenuItem.html">BiMenuItem</a></code></code></td>
<td class="optional-column"><img src="check.png" alt="checked"></td>
<td></td>
<td>The existing child do add the new menu item before</td>
</tr>
</tbody>
</table>
<h4>Return Type</h4>
<p><code class="type">void</code></p>
<h3><a name="contains"></a>contains</h3>
<p>Returns true if the menu contains another menu item or menu.
This means that the current component is an ancestor of the descendant.
Note that the current component contains itself so calling
<code>component.contains(component)</code> will return <code>true</code>.
</p>
<h4>Syntax</h4>
<pre class="method-syntax">object.contains(<span class="methodArgument">oComponent</span>)</pre>
<h4>Parameters</h4>
<table>
<thead>
<tr>
<td>Name</td>
<td>Type</td>
<td class="optional-header">Optional</td>
<td>Default</td>
<td>Descripton</td>
</tr>
</thead>
<tbody>
<tr>
<td><code>oComponent</code></td>
<td><code class="type"><code><a href="BiMenu.html">BiMenu</a></code> / <code><a href="BiMenuItem.html">BiMenuItem</a></code></code></td>
<td class="optional-column"></td>
<td></td>
<td>The object to test whether the current component contains it.</td>
</tr>
</tbody>
</table>
<h4>Return Type</h4>
<p><code class="type">Boolean</code></p>
<h3><a name="hasChildren"></a>hasChildren</h3>
<p>Returns true if the menu has any child menu items</p>
<h4>Syntax</h4>
<pre class="method-syntax">object.hasChildren()</pre>
<h4>Parameters</h4>
<h4>Return Type</h4>
<p><code class="type">Boolean</code></p>
<h3><a name="remove"></a>remove</h3>
<p>Removes an existing menu item from the component.</p>
<h4>Syntax</h4>
<pre class="method-syntax">object.remove(<span class="methodArgument">oChild</span>)</pre>
<h4>Parameters</h4>
<table>
<thead>
<tr>
<td>Name</td>
<td>Type</td>
<td class="optional-header">Optional</td>
<td>Default</td>
<td>Descripton</td>
</tr>
</thead>
<tbody>
<tr>
<td><code>oChild</code></td>
<td><code class="type"><code><a href="BiMenuItem.html">BiMenuItem</a></code></code></td>
<td class="optional-column"></td>
<td></td>
<td>The menu item to remove</td>
</tr>
</tbody>
</table>
<h4>Return Type</h4>
<p><code class="type"><code><a href="BiMenuItem.html">BiMenuItem</a></code></code></p>
<h3><a name="setLocation"></a>setLocation</h3>
<p>Sets the left and top position relative to the screen for the menu.</p>
<h4>Syntax</h4>
<pre class="method-syntax">object.setLocation(<span class="methodArgument">left</span>, <span class="methodArgument">top</span>)</pre>
<h4>Parameters</h4>
<table>
<thead>
<tr>
<td>Name</td>
<td>Type</td>
<td class="optional-header">Optional</td>
<td>Default</td>
<td>Descripton</td>
</tr>
</thead>
<tbody>
<tr>
<td><code>left</code></td>
<td><code class="type">Number</code></td>
<td class="optional-column"></td>
<td></td>
<td>The new left location for the menu</td>
</tr>
<tr>
<td><code>top</code></td>
<td><code class="type">Number</code></td>
<td class="optional-column"></td>
<td></td>
<td>The new top location for the menu</td>
</tr>
</tbody>
</table>
<h4>Return Type</h4>
<p><code class="type">void</code></p>
<h3><a name="setSize"></a>setSize</h3>
<p>Sets the width and height of the menu.</p>
<h4>Syntax</h4>
<pre class="method-syntax">object.setSize(<span class="methodArgument">nWidth</span>, <span class="methodArgument">nHeight</span>)</pre>
<h4>Parameters</h4>
<table>
<thead>
<tr>
<td>Name</td>
<td>Type</td>
<td class="optional-header">Optional</td>
<td>Default</td>
<td>Descripton</td>
</tr>
</thead>
<tbody>
<tr>
<td><code>nWidth</code></td>
<td><code class="type">Number</code></td>
<td class="optional-column"></td>
<td></td>
<td>The new width for the menu</td>
</tr>
<tr>
<td><code>nHeight</code></td>
<td><code class="type">Number</code></td>
<td class="optional-column"></td>
<td></td>
<td>The new height for the menu</td>
</tr>
</tbody>
</table>
<h4>Return Type</h4>
<p><code class="type">void</code></p>
</body>
</html>
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -