本文整理汇总了C#中System.Windows.Forms.TextBox.onTextChange方法的典型用法代码示例。如果您正苦于以下问题:C# TextBox.onTextChange方法的具体用法?C# TextBox.onTextChange怎么用?C# TextBox.onTextChange使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类System.Windows.Forms.TextBox
的用法示例。
在下文中一共展示了TextBox.onTextChange方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: buildGui
public void buildGui(string captchaQuestionUrl)
{
CaptchaQuestionUrl = captchaQuestionUrl;
var browser = this.add_Browser();
var panelAbove = browser.insert_Above<Panel>(25);
var label = panelAbove.add_Label("What does the CAPTCHA say?").top(6);
var button = panelAbove.add_Button("Submit");
button.left(panelAbove.width()-button.width())
.anchor_TopRight();
AnswerTextBox = label.append_TextBox("");
AnswerTextBox.onTextChange((text)=>CaptchaAnswer = text)
.onEnter((text) => answerAvailable())
.width(panelAbove.width() -button.width() - label.width() - 10)
.anchor_TopLeftRight()
.top(2);
button.onClick(() => answerAvailable());
browser.open(CaptchaQuestionUrl);
this.parentForm().Closed += (sender,e) => answerAvailable();
}
示例2: buildGui
public void buildGui()
{
UserNameTextBox = this.add_Label("Username:",10,0)
.append_TextBox("");
UserNameTextBox.onTextChange((text)=> UserName = text)
.align_Right(this);
PasswordTextBox = this.add_Label("Password: ",35,0)
.append_TextBox("")
.isPasswordField();
PasswordTextBox.onTextChange((text)=> Password = text)
.align_Right(this);
var OKButton = this.add_Button("OK", 60,0);
OKButton.onClick(answerAvailable)
.left(this.width() - OKButton.width() - 1)
.anchor_BottomRight();
this.parentForm().Closed += (sender,e) => answerAvailable();
}