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

TMenuItem.CheckChildrenHandles

Verifies the handles for child menu items on the menu.

Declaration

Source position: menus.pp line 238

protected procedure TMenuItem.CheckChildrenHandles;

Description

CheckChildrenHandles recursively checks menu items to ensure that handles for merged / child menu items are freed when they are hidden, or not owned by a menu item on the menu. No actions are performed in the method when Items has not been assigned.

At run-time, InitiateActions is called to ensure that the visibility of child Items with an action are up-to-date. If AutoLineReduction is in effect, RethinkLines is called to remove redundant menu separators. These actions are not performed at design-time.

The handle for hidden menu items in MergedItems are freed. The handle for visible menu items in MergedItems are freed and re-created.

CheckChildrenHandles is called from CreateHandle when the handle for a menu item is allocated. It is also called when a menu item is merged into another menu or item. Finally, it is called when update notifications are handled for the class instances in the Items property.

See also

TMenuItem.CreateHandle

  

Creates the Handle for the menu item.

TMenuItem.Handle

  

Handle for the menu item allocated in the widgetset class.

TMenuItem.Menu

  

Menu where the menu item is displayed.

TMenuItem.Parent

  

The parent menu item for the class instance.

TMenuItem.Items

  

Provides indexed access to the child menu items for the current class instance.

TMenuItem.MergedItems

  

Returns the visible and invisible child items taking the merged menu into account.

TMenuItem.MergedWith

  

Menu item where the current class instance was merged.

TMenuItem.InitiateActions

  

Updates Actions in child menu items.

TMenuItem.InitiateAction

  

Updates the Action in the ActionLink for the menu item.

TMenuItem.AutoLineReduction

  

Indicates the method used to perform line reduction for the menu item and optionally for its child Items.

TMenuItem.RethinkLines

  

Performs actions needed to update the visibility of child menu separators and signal the OnChange event handler for the changes.

TMenuItem.Action

  

Action is the default action associated with the menu item.

TMenuItem.Visible

  

Indicates whether the menu item is visible (True) or hidden (False).

TMenuItems.Notify

  

Notifies the parent and the merged menu item that a child menu item has been added, extracted, or deleted.


Version 4.0 Generated 2025-05-03 Home