Sign in Join
FPDoc Onlineexperiment

TCustomBitBtn.Click procedure

Member of TCustomBitBtnpublicIn unit Buttons

Performs actions needed when the button is clicked.

Declaration

pascal
procedure Click; override

Description

Click is an overridden method in TCustomBitBtn. It ensures that the correct actions are performed based on the value in the Kind property. When Kind is set to bkClose, the non-nested parent form is closed for the following conditions:

  • ModalResult is set to mrNone, or
  • ModalResult is mrCancel and the parent form is displayed as a modal dialog.

If Kind has any other value, the inherited Click method is called to determine the ModalResult and signal the OnChange event handler (when assigned).

Click is called when the DialogChar method handles an accelerator key for the control, when the Action for the control is executed, and when a mouse click event is handled for the control.

See also

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