wattry
wattry

Reputation: 994

How do you make an event happen when text is entered into a textbox in C#

I am making an EPOS and I would like continually take input from a textbox but the textbox must only take the value if it is validated and is on a list of variables.

I just need to know what event that would be on the textbox

Upvotes: 0

Views: 191

Answers (2)

Casey
Casey

Reputation: 3353

You can use the TextChanged event.

Upvotes: 1

Jerry
Jerry

Reputation: 4408

For validation, KeyPress event is appropriate. You can control which characters can be entered in the text box.

Here's an example: How do I make a textbox that only accepts numbers?

Upvotes: 2

Related Questions