[英]Why Text_Changed event of TextBox does not fire when we change its text programmatically?
I have designed a softkeypad and changing textbox text programmatically such as我设计了一个软键盘并以编程方式更改文本框文本,例如
myKeypad.getControl.Text += "Char";
but textbox textchanged event does not fire.但文本框 textchanged 事件不会触发。 How can I solve this problem?
我怎么解决这个问题? Is it possible that we can create custom textChanged and KeyPressed Events which can fire by changing text or key press by softkeypad programmatically?
我们是否可以创建自定义 textChanged 和 KeyPressed 事件,这些事件可以通过以编程方式更改文本或软键盘按键来触发?
It should be triggered.它应该被触发。
From MSDN Control.TextChanged Event :来自 MSDN Control.TextChanged 事件:
This event is raised if the Text property is changed by either a programmatic modification or user interaction.
如果通过编程修改或用户交互更改了 Text 属性,则会引发此事件。
Where are you adding the Event Handler?您在哪里添加事件处理程序?
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.