Vcl.Menus.TMenu.MenuChanged

From RAD Studio API Documentation
Jump to: navigation, search

Delphi

procedure MenuChanged(Sender: TObject; Source: TMenuItem; Rebuild: Boolean); virtual;

C++

virtual void __fastcall MenuChanged(System::TObject* Sender, TMenuItem* Source, bool Rebuild);

Properties

Type Visibility Source Unit Parent
procedure
function
protected
Vcl.Menus.pas
Vcl.Menus.hpp
Vcl.Menus TMenu

Description

Responds when the menu changes.

MenuChanged is called automatically when changes occur that affect the structure of the menu. The Sender parameter indicates the object that originates the change. Its value can be nil (Delphi) or NULL (C++). Source indicates which menu item is affected. Rebuild indicates whether the menu must be rebuilt to reflect the change (for example when items are added or deleted).

MenuChanged calls the DoChange method, which generates an OnChange event.

Note: Changes that affect individual items rather than the menu as a whole trigger the UpdateItems method instead of MenuChanged. For example, when the Images property changes, UpdateItems is called rather than MenuChanged.

See Also