bimenu.html

来自「ajax 框价.是个好工具.javascript 矿家.可以用在任何平台.」· HTML 代码 · 共 531 行 · 第 1/2 页

HTML
531
字号
 <code>component.contains(component)</code> will return <code>true</code>.</td></tr><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="#removeAll">removeAll</a></code></td><td>Removes and disposes all menu items in the menu</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>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 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">oDescendant</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>oDescendant</code></td><td><code class="type">Object</code></td><td class="optional-column"></td><td></td><td>The <code><a href="BiMenu.html">BiMenu</a></code> or <code><a href="BiMenuItem.html">BiMenuItem</a></code> 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><p>No arguments.</p><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="removeAll"></a>removeAll</h3><p>Removes and disposes all menu items in the menu</p><h4>Syntax</h4><pre class="method-syntax">object.removeAll()</pre><h4>Parameters</h4><p>No arguments.</p><h4>Return Type</h4><p><code class="type">void</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">nLeft</span>, <span class="methodArgument">nTop</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>nLeft</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>nTop</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 + =
减小字号Ctrl + -
显示快捷键?