Vcl.Menus.NewLine

From RAD Studio API Documentation
Jump to: navigation, search

Delphi

function NewLine: TMenuItem;

C++

extern DELPHI_PACKAGE TMenuItem* __fastcall NewLine(void);

Properties

Type Visibility Source Unit Parent
function public
Vcl.Menus.pas
Vcl.Menus.hpp
Vcl.Menus Vcl.Menus

Description

Creates a menu item for a separator. Call NewLine to create a separator that divides the items in a menu into logical groups. Once the menu item for the separator has been created using NewLine, it can be added to a menu using the target parent's Add method. If the entire menu is being created dynamically at run time, the new menu item can be added to an array that is passed as a parameter to the NewMenu, NewPopupMenu, or NewSubMenu function.

Warning: The item returned by NewLine does not have an owner. You are responsible for freeing its memory when it is no longer needed. The Delete and Remove methods of TMenuItem do not free memory.

See Also