如何禁用用户点击其他按钮的所有按钮直到按下按钮返回的响应 [英] how can i Disable all Buttons for a user to click on the other buttons Until to response of Button Pressed Returns

查看:58
本文介绍了如何禁用用户点击其他按钮的所有按钮直到按下按钮返回的响应的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何禁用用户点击其他按钮的所有按钮直到按下按钮返回的响应,因为我在按钮上触发了查询

how can i Disable all Buttons for a user to click on the other buttons Until to response of Button Pressed Returns ,as i have fired a Query on the button click

推荐答案

每个按钮都有一个 ENABLED 属性。将 ENABLED 设置为 False 以禁用按钮并 True 启用按钮。



参见按钮类 [ ^ ]



Every button has an ENABLED property. Set ENABLED to False to disable a button and to True to enable a button.

See Button Class[^]

button1.Enabled = False;


使用visible属性作为假,直到用户点击按钮





显示属性为禁用



希望这对您有用
use the visible property as a false up to the user click on button

or
display property as disable

Hope this will works for you


您好,

您应该分开从型号查看:



查看:

按钮点击事件 - >打电话给模特说按钮已被点击所以开始工作。



型号:

型号会立即回复说,我开始工作了禁用按钮;

模型将继续完成工作;

一旦工作完成,模型将再次告诉View,我现在完成启用按钮。



问候

Jegan
Hi,
you should separate the View from Model:

View:
Button clicked Event -> call the Model to say the button has been clicked so start working.

Model:
Model will reply immediately saying, I start working so disable the button;
Model will continue to do the work;
Once the work completed the Model will tell the View again, I finished now enable the button.

Regards
Jegan


这篇关于如何禁用用户点击其他按钮的所有按钮直到按下按钮返回的响应的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆