mirror of
https://github.com/gui-cs/Terminal.Gui.git
synced 2026-01-01 08:50:25 +01:00
Remove constructors with frame parameters from TextField class.
This commit is contained in:
@@ -47,15 +47,6 @@ public class TextField : View {
|
||||
/// <param name="text">Initial text contents.</param>
|
||||
public TextField (string text) : base (text) => SetInitialProperties (text, text.GetRuneCount () + 1);
|
||||
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="TextField"/> class using <see cref="LayoutStyle.Absolute"/> positioning.
|
||||
/// </summary>
|
||||
/// <param name="x">The x coordinate.</param>
|
||||
/// <param name="y">The y coordinate.</param>
|
||||
/// <param name="w">The width.</param>
|
||||
/// <param name="text">Initial text contents.</param>
|
||||
public TextField (int x, int y, int w, string text) : base (new Rect (x, y, w, 1)) => SetInitialProperties (text, w);
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the text to render in control when no value has
|
||||
/// been entered yet and the <see cref="View"/> does not yet have
|
||||
|
||||
@@ -16,7 +16,9 @@ public class Buttons : Scenario {
|
||||
};
|
||||
Win.Add (editLabel);
|
||||
// Add a TextField using Absolute layout.
|
||||
var edit = new TextField (31, 0, 15, "") {
|
||||
var edit = new TextField ("") {
|
||||
X = 31,
|
||||
Width = 15,
|
||||
HotKey = Key.Y.WithAlt,
|
||||
};
|
||||
Win.Add (edit);
|
||||
|
||||
@@ -15,7 +15,7 @@ public class LabelsAsLabels : Scenario {
|
||||
};
|
||||
Win.Add (editLabel);
|
||||
// Add a TextField using Absolute layout.
|
||||
var edit = new TextField (31, 0, 15, "");
|
||||
var edit = new TextField ("") { X = 31, Width = 15 };
|
||||
Win.Add (edit);
|
||||
|
||||
// This is the default Label (IsDefault = true); if user presses ENTER in the TextField
|
||||
|
||||
@@ -73,7 +73,7 @@ public class Threading : Scenario {
|
||||
ColorScheme = Colors.TopLevel
|
||||
};
|
||||
|
||||
var text = new TextField (1, 3, 100, "Type anything after press the button");
|
||||
var text = new TextField ("Type anything after press the button") { X = 1, Y = 3, Width = 100 };
|
||||
|
||||
var _btnAction = new Button ("Load Data Action") { X = 80, Y = 10 };
|
||||
_btnAction.Clicked += (s, e) => _action.Invoke ();
|
||||
|
||||
@@ -163,7 +163,7 @@ public class WindowsAndFrameViews : Scenario {
|
||||
ColorScheme = Colors.Base,
|
||||
Text = "The Text in the FrameView",
|
||||
};
|
||||
subFrameViewofFV.Add (new TextField (0, 0, 15, "Edit Me"));
|
||||
subFrameViewofFV.Add (new TextField ("Edit Me") { Width = 15 });
|
||||
|
||||
subFrameViewofFV.Add (new CheckBox ("Check me") { Y = 1 });
|
||||
// BUGBUG: This checkbox is not shown even though frameViewFV has 3 rows in
|
||||
|
||||
Reference in New Issue
Block a user