mirror of
https://github.com/gui-cs/Terminal.Gui.git
synced 2026-01-01 16:59:35 +01:00
Added TextView.TextChanged event (#264)
This commit is contained in:
@@ -1,4 +1,4 @@
|
|||||||
//
|
//
|
||||||
// TextView.cs: multi-line text editing
|
// TextView.cs: multi-line text editing
|
||||||
//
|
//
|
||||||
// Authors:
|
// Authors:
|
||||||
@@ -266,6 +266,8 @@ namespace Terminal.Gui {
|
|||||||
bool selecting;
|
bool selecting;
|
||||||
//bool used;
|
//bool used;
|
||||||
|
|
||||||
|
public event EventHandler TextChanged;
|
||||||
|
|
||||||
#if false
|
#if false
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Changed event, raised when the text has clicked.
|
/// Changed event, raised when the text has clicked.
|
||||||
@@ -312,6 +314,7 @@ namespace Terminal.Gui {
|
|||||||
set {
|
set {
|
||||||
ResetPosition ();
|
ResetPosition ();
|
||||||
model.LoadString (value);
|
model.LoadString (value);
|
||||||
|
TextChanged?.Invoke(this, new EventArgs());
|
||||||
SetNeedsDisplay ();
|
SetNeedsDisplay ();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user