简体   繁体   中英

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. 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?

It should be triggered.

From MSDN Control.TextChanged Event :

This event is raised if the Text property is changed by either a programmatic modification or user interaction.

Where are you adding the Event Handler?

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM