[Overview][Constants][Types][Classes][Procedures and functions][Variables][Index] | Reference for unit 'Menus' (#lcl)

# TMenuItem.AddSeparator

Adds a separator line to the child menu items.

## Declaration

Source position: menus.pp line 281

`public procedure TMenuItem.AddSeparator;`

## Description

AddSeparator is a method used to add a separator line to the child menu Items. AddSeparator creates a new TMenuItem instance, and sets its Caption to the value in the cLineCaption constant. The Add method is called to append the menu item to the Items property.

## See also

TMenuItem.Caption |  | The caption text displayed for the menu item.
TMenuItem.Items |  | Provides indexed access to the child menu items for the current class instance.
TMenuItem.Add |  | Adds item(s) to the menu item.
TMenuItem.Insert |  | Insert stores the specified menu item at the location indicated by Index.
cLineCaption |  | Caption used for a menu item displayed as a separator line.