ChatControl: Send chat message with return.

This commit is contained in:
2015-06-06 02:14:24 +02:00
parent 768793fa47
commit 65a5670f40

View File

@@ -123,6 +123,7 @@ namespace Scrummer.Code.Controls
var txtText = new TextBox { ID = "txtText", CssClass = "chatTextBox" }; var txtText = new TextBox { ID = "txtText", CssClass = "chatTextBox" };
txtText.Attributes.Add("autocomplete", "off"); txtText.Attributes.Add("autocomplete", "off");
txtText.Attributes.Add("onkeydown", String.Format("if(event.keyCode==13){{SendChat({0}); return false;}}", strCfgName));
divChatControls.Controls.Add(txtText); divChatControls.Controls.Add(txtText);
var btnSend = new Button { ID = "btnSend", Text = "Send", CssClass = "chatButton" }; var btnSend = new Button { ID = "btnSend", Text = "Send", CssClass = "chatButton" };