Click to return to the Component Development home page    
Web Workshop  |  Component Development

Menu Control -- Reference Info


Properties

ItemCount: The number of menu items in the current menu (read only)

Caption: The caption to be displayed


Parameter Tags

Menuitem[]: The menu item to be displayed

Caption: The caption to be displayed.


Methods

AboutBox: Displays the About dialog box.

PopUp ( [in] int x, [in] int y): Pops up the menu. If no value is passed for X or Y position (or both), the current mouse position is used to display the popup menu. The x and y values are relative to the window, not to the screen.

Clear: Clears off all menu items.

RemoveItem ([in] int index): Removes the specified item. If the menu item does not exist, nothing is done.

Additem ([in] String, [in/optional] int index): Adds the passed menu item at the specified index. If no index is passed, the item is appended to the menu.


Events

Select(int item): item indicates the menu item selected.

Click: No menu items were present, and the button was clicked.


Sample HTML

   <OBJECT ID=BtnMenu1 CLASSID="clsid:52DFAE60-CEBF-11CF-A3A9-00A0C9034920"
         CODEBASE="http://activex.microsoft.com/controls/iexplorer/x86/btnmenu.cab#version=4,71,115,0"
         WIDTH=80 HEIGHT=25 ALIGN=MIDDLE>
         <PARAM NAME="Caption" VALUE="Menu">
         <PARAM NAME="Menuitem[0]" VALUE="Item1">
         <PARAM NAME="Menuitem[1]" VALUE="Item2">
         <PARAM NAME="Menuitem[2]" VALUE="Item3">
         <PARAM NAME="Menuitem[3]" VALUE="Item4">
         <PARAM NAME="Menuitem[4]" VALUE="">
         <PARAM NAME="Menuitem[5]" VALUE="Item6">
   </OBJECT>

HomeBack to ActiveX Controls Programming Reference



Back to topBack to top

© 1999 Microsoft Corporation. All rights reserved. Terms of use.