From 6944b755f580cc68c9b5716f3c93f5bc094c2192 Mon Sep 17 00:00:00 2001 From: Daniel Cazzulino Date: Sat, 2 Nov 2019 23:22:55 -0300 Subject: [PATCH] Added TextView.TextChanged event (#264) --- Terminal.Gui/Views/TextView.cs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Terminal.Gui/Views/TextView.cs b/Terminal.Gui/Views/TextView.cs index 243fd29c4..f0f42b5cc 100644 --- a/Terminal.Gui/Views/TextView.cs +++ b/Terminal.Gui/Views/TextView.cs @@ -1,4 +1,4 @@ -// +// // TextView.cs: multi-line text editing // // Authors: @@ -266,6 +266,8 @@ namespace Terminal.Gui { bool selecting; //bool used; + public event EventHandler TextChanged; + #if false /// /// Changed event, raised when the text has clicked. @@ -312,6 +314,7 @@ namespace Terminal.Gui { set { ResetPosition (); model.LoadString (value); + TextChanged?.Invoke(this, new EventArgs()); SetNeedsDisplay (); } }