Software Developer's Kit - ChemDraw

Send comments on this topic
Menu Object
See Also  Members 

Description

Member of ChemDraw Control.

For a list of all members defined for this object, see Menu Members.

ChemDraw Menu Class represents a menu object. 

Remarks

A menu object hierarchaly depends from a menu bar object.

Example

Private Sub cmdCommand_click()
   'Declares variables 
    Dim myMenu As ChemDrawControl11Ctl.Menu
    Dim myMenus As ChemDrawControl11Ctl.Menus
    Dim myMenuBar As ChemDrawControl11Ctl.MenuBar
    Dim myMenuBars As ChemDrawControl11Ctl.MenuBars
    Dim myMenuItem As ChemDrawControl11Ctl.MenuItem
    Dim myMenuItems As ChemDrawControl11Ctl.MenuItems
   'Returns number of MENU BARS 
    Text1.Text = "menuBars " & ctlChemDraw.Application.MenuBars.Count
    Set myMenuBar = ctlChemDraw.Application.MenuBars.Item(1)  
   'Returns number of MENUS 
    Text2.Text = "menus " & myMenuBar.Menus.Count  
    Set myMenu = myMenuBar.Menus.Item(1)   
   'Returns menu properties 
    Text3.Text = myMenu.Application
    Text4.Text = myMenu.Caption 
    Text5.Text = myMenu.Enabled
    Text6.Text = myMenu.Index   
   'Returns number of MENU ITEMS 
    Text7.Text = "menuItems " & myMenu.MenuItems.Count
    Set myMenuItem = myMenu.MenuItems.Item(1)   
   'Returns a menu item property
    Text8.Text = myMenuItem.Caption
    ctlChemDraw.UpdateMenus
End Sub

See Also