From RAD Studio API Documentation
Jump to: navigation, search


property OnAccept: TNotifyEvent read FOnAccept write FOnAccept;


__property System::Classes::TNotifyEvent OnAccept = {read=FOnAccept, write=FOnAccept};


Type Visibility Source Unit Parent
event public
Vcl.StdActns TCommonDialogAction


Occurs after the user exits a modal dialog by selecting “OK” or when a modeless dialog is successfully displayed.

Write an OnAccept event handler to make use the dialog results after it executes. When the action fires, it executes its associated dialog. OnAccept occurs when the dialog component's Execute method returns true. Thus, if the dialog is modal, OnAccept occurs when the user closes the dialog by clicking the OK button. If the dialog is modeless, OnAccept occurs when the dialog first appears.

For modal dialogs, use the OnAccept event to read the user's selections from the dialog and act on them. TCommonDialogAction descendants introduce a Dialog property that the event handler can use to obtain information about the user's selections.

See Also