advr.hlp (Topic list)
Separator Property Details
  Summary  Details                           Contents  Index  Back
──────────────────────────────────────────────────────────────────────────────
 [form.]menuitem.Separator[ = boolean%]
 
 Usage Notes
   ■ The default Separator value for a menu control is False. If a submenu
     item's Separator property is set to True at run time, its caption is
     displayed as a separator bar and the menu item does not receive events.
     For example:
 
     Menu Item #1 at Design Time:        Menu Item #1 at Run Time:
     Separator = False                   Separator = True
     Caption = "Open File"               Caption = "Open File"
     ┌─────────────────┐                 ┌─────────────────┐
     │ Open File       │                 ├─────────────────┤
     └─────────────────┘                 └─────────────────┘
 
     When set back to False, the caption is displayed and events can be
     received.
 
   ■ At design time, if you type a hyphen (-) in the Caption text box of an
     indented menu item, the Separator property is automatically set to True.
     If the property is set to False at run time, the submenu item is
     displayed with the caption "-" and events can be received. For example:
 
     Menu Item #2 at Design Time:        Menu Item #2 at Run Time:
     Separator = True                    Separator = False
     Caption = "-"                       Caption = "-"
     ┌─────────────────┐                 ┌─────────────────┐
     │ Open File       │                 │ Open File       │
     ├─────────────────┤                 │        -        │
     │ Exit     Alt+F4 │                 │ Exit     Alt+F4 │
     └─────────────────┘                 └─────────────────┘
 
   ■ If you try to set the Separator property for a top-level menu item,
     Visual Basic generates the error message, "Separator property can't be
     set on this control."