aboutsummaryrefslogtreecommitdiffstatsci
path: root/src/GraphicObjects/TextBox.cs
diff options
context:
space:
mode:
Diffstat (limited to 'src/GraphicObjects/TextBox.cs')
-rw-r--r--src/GraphicObjects/TextBox.cs9
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