From 61ca3a49edc32ef0509b975e21e5c7856772b2b8 Mon Sep 17 00:00:00 2001 From: Thomas Date: Sat, 1 Apr 2023 10:49:05 +0100 Subject: [PATCH] Added Caption property --- Terminal.Gui/Views/TextField.cs | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/Terminal.Gui/Views/TextField.cs b/Terminal.Gui/Views/TextField.cs index fecc2cb42..5a46ab2b0 100644 --- a/Terminal.Gui/Views/TextField.cs +++ b/Terminal.Gui/Views/TextField.cs @@ -29,6 +29,19 @@ namespace Terminal.Gui { HistoryText historyText = new HistoryText (); CultureInfo currentCulture; + /// + /// Gets or sets the text to render in control when no value has + /// been entered yet and the does not yet have + /// input focus. + /// + public string Caption {get;set;} + + /// + /// Gets or sets the foreground to use when + /// rendering . + /// + public Color CaptionColor {get;set;} = Color.DarkGray; + /// /// Tracks whether the text field should be considered "used", that is, that the user has moved in the entry, so new input should be appended at the cursor position, rather than clearing the entry ///