Textbox.TextChanged event

  • Thread starter Thread starter Jerry Spence1
  • Start date Start date
J

Jerry Spence1

I would have thought that VB.Net would have improved the situation whereby
it doesn't know the difference between the text changing due to the operator
and text changing programmatically. I wonder why it didn't have two events
for this.

The only work around I can find is setting global variables or the .TAG
property on mouse down and up events. Very messy. Is there another way?

-Jerry
 
Jerry,

For a text change event with the keybord is probably the best to use the
key-up, that gives you the most information.

For a change in text with your program, you don't need in my opinion no
event, you do that yourself.

I hope this helps,

Cor
 
Cor Ligthert said:
Jerry,

For a text change event with the keybord is probably the best to use the
key-up, that gives you the most information.

For a change in text with your program, you don't need in my opinion no
event, you do that yourself.

I hope this helps,

Cor

Thanks Cor (for both answers)
 
I agree...the textbox(and most other controls where users can input data)
need some form of SetText method that doesn't trigger the TextChanged event.
It's quite annoying to try to initialize text in code when you want to
respond to a text change event when the user changes the text.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top