如果某些editText字段已被填充,我如何调整按钮才能继续? [英] how do i condition a button to proceed only if some editText fields have been filled?
本文介绍了如果某些editText字段已被填充,我如何调整按钮才能继续?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
如果某个editText字段已被填充,我如何调整按钮才能继续?
解决方案
检查它们。或者让他们改变.Enabled属性。
我倾向于编写一种方法来检查一些事情并设置适当的启用。
private void UpdateStuff()
{
button3.Enabled = box1.Length> 0&& box2.Length> 0;
...
}
然后从box1的ValueChanged方法调用它BOX2。
how do i condition a button to proceed only if some editText fields have been filled?
解决方案
Check them. Or have them alter the .Enabled property.
I tend to write a method that will check a number of things and set Enableds as appropriate.
private void UpdateStuff() { button3.Enabled = box1.Length>0 && box2.Length>0 ; ... }
Then this gets called from the ValueChanged methods of box1 and box2.
这篇关于如果某些editText字段已被填充,我如何调整按钮才能继续?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文