Sign in Join
FPDoc Onlineexperiment

TMenuItem.SetAction procedure

Member of TMenuItemprotectedIn unit Menus

Sets the value for the Action property.

Declaration

pascal
procedure SetAction(NewAction: TBasicAction)

Arguments

NewAction

New value for the Action property.

Description

SetAction ensures that the ActionLink property is updated when the new property value is applied to the control.

When NewAction contains Nil, the class instance in ActionLink is freed and Nil'd.

Otherwise, GetActionLinkClass is called to create a new action link class instance for the ActionLink member. Its Action property is set to the value in NewAction, and its OnChange event handler is set to the DoActionChange method. ActionChange is called to synchronize property values in the class instance to the values in the Action.

See also

An experiment, built from development snapshots. Not the official Free Pascal or Lazarus documentation.