RAD Studio VCL Reference
ContentsIndex
PreviousUpNext
TMainMenu.MenuChanged Method

Responds when the menu changes.

Pascal
procedure MenuChanged(Sender: TObject; Source: TMenuItem; Rebuild: Boolean); override;
C++
virtual __fastcall MenuChanged(TObject * Sender, TMenuItem Source, Boolean Rebuild);

MenuChanged is called automatically when changes occur that affect the structure of the menu. The Sender parameter indicates the object that originates the change. It's 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.
 

 

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