等待光标来了,但我仍然可以点击按钮 [英] wait cursor comes but still i am able to click the button

查看:80
本文介绍了等待光标来了,但我仍然可以点击按钮的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述







我在我的应用程序中使用等待光标直到某些处理完成,问题仍然是我能够点击按钮..



我不希望在waitcursor到来时禁用按钮并单击。

请帮帮我。



Thnks。

Hi,


I have used wait cursor in my application until some processing finish, problem is still i can able to click the button..

I dont want button to be disabled and clicked during waitcursor comes.
Please help me with this.

Thnks.

推荐答案

等等光标只是表明事情正在发生的迹象。它不会停止任何动作。
Wait cursor is just an indication to show that something is going on. It won''t stop any action.


禁用按钮是唯一的解决方案。但是你也有两个(丑陋的)替代品:

  • 在按钮点击处理程序中,如果你处于''等待光标''状态,那么什么都不做
Disabling the button is the only neat solution. However you have also two (ugly) alternatives:
  • In the button click handler, if you are in ''wait cursor'' state then do nothing.
  • 创建一个所有者绘制按钮,并使用与活动图像相同的图像表示禁用状态。


即使它显示等待光标也可以执行鼠标操作。

所以你必须根据你的情况处理按钮点击。
It is possible to perform mouse operations even though it shows wait cursor.
So you have to handle the button click according to your situation.


这篇关于等待光标来了,但我仍然可以点击按钮的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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