开发者

how I can check the leave event is occured in other buttons click event in C#

开发者 https://www.devze.com 2023-04-12 12:53 出处:网络
I have called a leave event for a a text box and in it called another buttons event 开发者_JAVA技巧named Retrieve button. so now I just want to check in this retrieve button event weather the text box

I have called a leave event for a a text box and in it called another buttons event 开发者_JAVA技巧named Retrieve button. so now I just want to check in this retrieve button event weather the text box's leave event is called or not?


When you call the retrieve button event from the text box leave (blur) event you could simply add a flag into the eventArgs that you can check in the retrieve button. This flag would only be set when you implicitly call the retrieve button even from the text box leave event.

This would mean that if the retrieve event is called from other places the flag would not be set so you could tell that the call definitely came from the button leave event.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号