Vcl.Menus.TPopupMenu.AutoLineReduction

From RAD Studio API Documentation
Jump to: navigation, search

Delphi

property AutoLineReduction: TMenuAutoFlag read GetAutoLineReduction write SetAutoLineReduction default 0;

C++

__property AutoLineReduction = {default=0};

Properties

Type Visibility Source Unit Parent
property published
Vcl.Menus.pas
Vcl.Menus.hpp
Vcl.Menus TPopupMenu

Description

Determines whether redundant separator bars are automatically removed from the menu.

Vcl.Menus.TPopupMenu.AutoLineReduction inherits from Vcl.Menus.TMenu.AutoLineReduction. All content below this line refers to Vcl.Menus.TMenu.AutoLineReduction.

Determines whether redundant separator bars are automatically removed from the menu.

Set AutoLineReduction to indicate whether the menu should automatically ensure that the menu does not start or end with a separator bar and that two separator bars do not appear next to each other. This ensures that menus built dynamically at runtime do not have separator bars in undesired positions.

Before the menu is displayed, it removes superfluous separator bars when AutoLineReduction is maAutomatic. When AutoLineReduction is maManual, the menu does not remove separators from the top-level menu items, but may remove superfluous separators from submenus, depending on the AutoLineReduction property of the menu item that is the parent of the submenu.

When AutoLineReduction is maManual, an application can still remove superfluous separators by calling the Items property's RethinkLines method. AutoLineReduction merely determines whether this adjustment occurs automatically.

Note: The AutoLineReduction property of a menu is linked to the AutoLineReduction property of the TMenuItems object that implements its Items property. Setting one sets the other.

See Also