【发布时间】:2013-08-05 13:25:59
【问题描述】:
我有一个文本框,但我找不到任何解释按下按钮时如何调用函数的来源。
public Simple()
{
Text = "Server Command Line";
Size = new Size(800, 400);
CenterToScreen();
Button button = new Button();
TextBox txt = new TextBox ();
txt.Location = new Point (20, Size.Height - 70);
txt.Size = new Size (600, 30);
txt.Parent = this;
button.Text = "SEND";
button.Size = new Size (50, 20);
button.Location = new Point(620, Size.Height-70);
button.Parent = this;
button.Click += new EventHandler(Submit);
}
一些消息来源告诉我要使用一个函数,但我不明白它是如何被调用的。
【问题讨论】:
-
当用户在文本框中输入内容时是否要调用按钮点击事件?
-
我建议您先访问此页面并四处看看:msdn.microsoft.com/en-us/library/vstudio/dd492171.aspx
-
不确定是否理解您的问题。