M. Nasir Javaid
M. Nasir Javaid

Reputation: 5990

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?

Upvotes: 1

Views: 2045

Answers (1)

Alexandre
Alexandre

Reputation: 4602

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?

Upvotes: 4

Related Questions