471,599 Members | 1,251 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,599 software developers and data experts.

TextBox: TextChanged event question

Hi.

The content of my textbox is "ABCD".

If I select the letter 'C' and I press 'X', the content obviously changes to
"ABXD".

Thsi however generates two separate "TextChanged" events
1) "ABCD" ==> "ABD"
2) "ABD" ==> "ABXD"

These are 2 sub-operations of one single macro operation from an Undo/Redo
point of view. How can I capture this? The TextChanged event does not convey
any information if an operation is standalone or part of a larger operation.
Is there any property I could look into? Should I look at a different event?

Thanks,
Fabio

Jan 8 '06 #1
2 3033

"Fabio Cannizzo" <fc*****************@london.edu> wrote in message
news:r2*****************@newsfe2-gui.ntli.net...
Hi.

The content of my textbox is "ABCD".

If I select the letter 'C' and I press 'X', the content obviously changes
to "ABXD".

Thsi however generates two separate "TextChanged" events
1) "ABCD" ==> "ABD"
2) "ABD" ==> "ABXD"

These are 2 sub-operations of one single macro operation from an Undo/Redo
point of view. How can I capture this? The TextChanged event does not
convey any information if an operation is standalone or part of a larger
operation. Is there any property I could look into? Should I look at a
different event?

Thanks,
Fabio

If you are looking to react to the completed change (i.e. when the user is
finished editing the content of the TextBox), you can use the Leave event.
Jan 8 '06 #2


Hi. Yes I need to react to the complete "typyng" event, but the focus
may still be on the control, hence I do nto think "leave" would work.

I suppose I can only use a combination of "TextCahnged" and "KeyDown",

Thanks,
Fabio

*** Sent via Developersdex http://www.developersdex.com ***
Jan 9 '06 #3

This discussion thread is closed

Replies have been disabled for this discussion.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.