|
@@ -48,13 +48,13 @@ namespace Terminal.Gui {
|
|
/// <param name="text">Initial text contents.</param>
|
|
/// <param name="text">Initial text contents.</param>
|
|
public TextField (string text) : this (ustring.Make (text))
|
|
public TextField (string text) : this (ustring.Make (text))
|
|
{
|
|
{
|
|
- Height = 1;
|
|
|
|
|
|
+ Initialize ();
|
|
}
|
|
}
|
|
|
|
|
|
/// <summary>
|
|
/// <summary>
|
|
/// Initializes a new instance of the <see cref="TextField"/> class using <see cref="LayoutStyle.Computed"/> positioning.
|
|
/// Initializes a new instance of the <see cref="TextField"/> class using <see cref="LayoutStyle.Computed"/> positioning.
|
|
/// </summary>
|
|
/// </summary>
|
|
- public TextField () : this (string.Empty) { }
|
|
|
|
|
|
+ public TextField () : this (string.Empty) { Initialize (); }
|
|
|
|
|
|
/// <summary>
|
|
/// <summary>
|
|
/// Initializes a new instance of the <see cref="TextField"/> class using <see cref="LayoutStyle.Computed"/> positioning.
|
|
/// Initializes a new instance of the <see cref="TextField"/> class using <see cref="LayoutStyle.Computed"/> positioning.
|
|
@@ -80,6 +80,8 @@ namespace Terminal.Gui {
|
|
|
|
|
|
void Initialize (ustring text, int w)
|
|
void Initialize (ustring text, int w)
|
|
{
|
|
{
|
|
|
|
+ Initialize ();
|
|
|
|
+
|
|
if (text == null)
|
|
if (text == null)
|
|
text = "";
|
|
text = "";
|
|
|
|
|
|
@@ -91,6 +93,11 @@ namespace Terminal.Gui {
|
|
WantMousePositionReports = true;
|
|
WantMousePositionReports = true;
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ void Initialize ()
|
|
|
|
+ {
|
|
|
|
+ Height = 1;
|
|
|
|
+ }
|
|
|
|
+
|
|
///<inheritdoc/>
|
|
///<inheritdoc/>
|
|
public override bool OnLeave (View view)
|
|
public override bool OnLeave (View view)
|
|
{
|
|
{
|