RAD Studio VCL Reference
ContentsIndex
PreviousUpNext
TMainMenu.AutoLineReduction Property

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

Pascal
property AutoLineReduction: TMenuAutoFlag;
C++
__property TMenuAutoFlag AutoLineReduction;

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.
 

 

Copyright(C) 2008 CodeGear(TM). All Rights Reserved.
What do you think about this topic? Send feedback!