如果未输入数据,则闪烁文本框. [英] Blink textBox if no data is entered.

查看:84
本文介绍了如果未输入数据,则闪烁文本框.的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

亲爱的所有人,

是否有可能让textBox或textbox颜色为

当我们在没有在文本上输入数据的情况下按下按钮时闪烁. 没有计时器

这一个可能与否?

如果是,我该怎么做?

如果没有:感谢您的阅读!

谢谢&问候

Dhinesh Kumar.V

Dear All,

Is there any possibility to let the textBox or textbox color

blinking when we press button without entered data at text. without timer

this one is possible or not ??

If yes: how do I do that?

if no: thanks for reading!

Thanks & Regards

Dhinesh Kumar.V

推荐答案

没有计时器就无法眨眼,不.文本框中没有内置的闪烁功能.
You can''t make things blink without a timer, no. There''s no blink functionality built in to the textbox.


不确定为什么不想使用计时器,但是如果愿意,可以始终运行另一个线程来运行将跟踪经过的时间并切换文本框的属性.为此,您可以使用例如 BackgroundWorker [
Not sure why you don''t want to use the timer but if you like, you can always have another thread running which would track the elapsed time and toggle the properties of a textbox. For this purpose you can use for example a BackgroundWorker[^].

Just remember that depending on the technology you may not update the properties of a UI control from another thread so you need to check if invoke is required (or similar, again depending on the UI technology).


前两个答案是好的.但是请检查此链接
http://ganeshmohan.wordpress.com/c-windows-validation-by-errorprovider-control / [^ ].它有助于显示控件上的验证.
--NDK
The first two answers are good. But check this link
http://ganeshmohan.wordpress.com/c-windows-validation-by-errorprovider-control/[^]. It helps how to show validation on control.
--NDK


这篇关于如果未输入数据,则闪烁文本框.的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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