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

# TMenuItem.InternalRethinkLines

Indicates whether child menu Items need to be updated to hide leading, trailing, or adjacent separators.

## Declaration

Source position: menus.pp line 233

`protected function TMenuItem.InternalRethinkLines(`
`AForced: Boolean`
`):Boolean; virtual;`

## Arguments

`AForced` |  | Not used in the current implementation.

## Function result

Returns Trueif the visibility for one or more of the child menu items was changed in the method.

## Description

InternalRethinkLines is called from the RethinkLines and CheckChildrenHandles methods. When AutoLineReduction is enabled, it visits each of the child menu Items and checks whether adjacent menu items are configured as menu separators (IsLine = True). The visibility for an adjacent menu separator is updated based on the visibility of its predecessor. If the first is visible, the second is hidden - and vice versa.

The return value indicates whether the visibility of child menu items has been updated. True indicates that the visibility for one or more of the child menu items was changed in the method.

To maintain compatibility with the Delphi VCL behavior, all menu separators are visible when GetAutoLineReduction returns False.

No actions are performed in InternalRethinkLines at design-time, and the return value is False.

## Version info

Added in LCL version 4.0.

## See also

TMenuItem.Items |  | Provides indexed access to the child menu items for the current class instance.
TMenuItem.Visible |  | Indicates whether the menu item is visible (True) or hidden (False).
TMenuItem.IsLine |  | True if the menu item is configured as a separator line.
TMenuItem.RethinkLines |  | Performs actions needed to update the visibility of child menu separators and signal the OnChange event handler for the changes.
TMenuItem.CheckChildrenHandles |  | Verifies the handles for child menu items on the menu.
TMenuItem.GetAutoLineReduction |  | Indicates whether automatic line reduction is enabled for the menu item.
TMenuItem.AutoLineReduction |  | Indicates the method used to perform line reduction for the menu item and optionally for its child Items.
TMenu.AutoLineReduction |  | Indicates the method used to perform line reduction for the menu and optionally for its child Items.