Table of Contents

Method OnPaste

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

OnPaste(string)

Override to insert sanitized paste text into the view. The default returns false because a plain View has no text model. Text-input views (TextField) override this to perform the insertion.

protected override bool OnPaste(string text)

Parameters

text string

The sanitized text to insert. Never null or empty.

Returns

bool

true if the view consumed the paste.

Remarks

Returns true even when ReadOnly so that Ctrl+V does not bubble to a parent view that might also bind paste.