diff options
| author | jpbruyere <jp.bruyere@hotmail.com> | 2016-02-05 18:36:22 +0100 |
|---|---|---|
| committer | jpbruyere <jp.bruyere@hotmail.com> | 2016-02-05 18:36:22 +0100 |
| commit | 759f4f39e3fdde1f9ed8b620af51e05d052d8964 (patch) | |
| tree | 227dfc400aefab23c7f34ea8065049c9dcdbefc2 /src/GraphicObjects/TextBox.cs | |
| parent | e86428443b1db0f1d07b51d0c202a111427837d2 (diff) | |
Textbox and Label: insert linebreak, update size if Fit
Diffstat (limited to 'src/GraphicObjects/TextBox.cs')
| -rw-r--r-- | src/GraphicObjects/TextBox.cs | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/GraphicObjects/TextBox.cs b/src/GraphicObjects/TextBox.cs index d9003b61..143d148f 100644 --- a/src/GraphicObjects/TextBox.cs +++ b/src/GraphicObjects/TextBox.cs @@ -97,7 +97,10 @@ namespace Crow break; case Key.Enter: case Key.KeypadEnter: - OnTextChanged(this,new TextChangeEventArgs(Text)); + if (Multiline) + this.InsertLineBreak (); + else + OnTextChanged(this,new TextChangeEventArgs(Text)); break; case Key.Escape: Text = ""; @@ -195,6 +198,10 @@ namespace Crow break; } + if (Width < 0) + RegisterForLayouting ((int)LayoutingType.Width); + if (Height < 0) + RegisterForLayouting ((int)LayoutingType.Height); registerForGraphicUpdate(); } #endregion |