Table of Contents

Method OnAccepting

Namespace
Terminal.Gui.Views
Assembly
Terminal.Gui.dll

OnAccepting(CommandEventArgs)

Overrides the default Accepting behavior to handle Dialog Button presses.

protected override bool OnAccepting(CommandEventArgs args)

Parameters

args CommandEventArgs

Returns

bool

Remarks

When the user accepts the dialog (via Ok button, pressing Enter, or other accept action), extracts the result using ResultExtractor and stores it in Result before closing.

If ResultExtractor is null and TResult is string, automatically uses Text as the result.

When the user cancels (via Cancel button, pressing Escape, or other cancel action), closes without setting a result.