如何在第三个文本框中自动获取两个文本框值的总和(AUTOMATIC POP UP) [英] how to get it automatically sum of two text boxes values in third text boxes(AUTOMATIC POP UP)
本文介绍了如何在第三个文本框中自动获取两个文本框值的总和(AUTOMATIC POP UP)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我知道两个文本框值的编码并在第三个文本框中检索它。
但是,
我的问题是,
第一个文本框:5
第二个文本框:5
第三个文本框= 10进入第一个文本框值和第二个文本框值,第三个文本框应自动显示第三个文本框中的结果总和。
它应该是自动弹出
我在Windows应用程序中执行我的项目,请发布与c#相关的命令。
帮帮我
谢谢
Uma
解决方案
您可以使用文本框已更改事件 [ ^ ]
你需要绑定文本框的事件,并确保文本框值是否为空,然后将其视为零。
希望你能很快完成。
祝你好运。
>
检查这个
http://msdn.microsoft.com/en-us/library/system.windows.forms.control.leave.aspx [ ^ ]
textBox1_Leave
在这个活动中做你的计算
最好的问候
M.Mitwalli
Hi ,
I know the coding of two text box values and retrieve it in third text box.
But,
My Question is ,
First Text box:5
Second text box:5
Third text box =10 while entering the first text box value and second text box value, third text box should show the sum of result in 3rd text box automatically.
It should be automatic pop up
Am doing my proj in Windows application, please post the commands related c#.
Help me
Thanks
Uma
解决方案
Hi,
You can use Textbox Changed event[^]
you need to bind event for both the textbox and make sure if the textbox value is empty then consider it as zero.
Hope you can do it very quickly.
Best luck.
Hi ,
Check this
http://msdn.microsoft.com/en-us/library/system.windows.forms.control.leave.aspx[^]
textBox1_Leave
do your calculation in this event
Best Regards
M.Mitwalli
这篇关于如何在第三个文本框中自动获取两个文本框值的总和(AUTOMATIC POP UP)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文