RAD Studio VCL Reference
ContentsIndex
PreviousUpNext
TFontEdit.OnAccept Event

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

Pascal
property OnAccept: TNotifyEvent;
C++
__property TNotifyEvent OnAccept;

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. 

 

Copyright(C) 2009 Embarcadero Technologies, Inc. All Rights Reserved.
What do you think about this topic? Send feedback!