如何检查dateTimePicker复选框的状态 [英] How to check status of dateTimePicker Checkbox

查看:334
本文介绍了如何检查dateTimePicker复选框的状态的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用具有以下属性的dateTimePicker:

I am working with a dateTimePicker with the properties:

dtpTimeArrive.ShowCheckBox = True
dtpTimeArrive.Format = Custom
dtpTimeArrive.CustomFormat = HH:mm
dtpTimeArrive.Checked = False
dtpTimeArrive.ShowUpDown = True





当我检查dtpTimeStart.checked的值时无论是否选中复选框,ALWAYS的值都为False。

When I check the value of dtpTimeStart.checked it ALWAYS has a value of False whether the check box is checked or not.

还有另一种检查控件是否被检查的方法吗?

Is there another method to check if the control is checked or not?

推荐答案

嗨DarrMik,

Hi DarrMik,

>> 当我检查dtpTimeStart.checked的值时,无论是否选中该复选框,它总是值为False。

从你的截图中如上所述,我注意到 你传阅的控件名称,检查状态值是
dtpTimeStart
在左侧,但在右侧,您检查的控件是"Time Arrived"。在黄色
circle,o 相反,以下控件我猜是dtpTimeStart,可以发现它的状态确实是假的。

From the screenshot you provided above, I noticed the name of the control you circulated to check the status value is dtpTimeStart on the left, but on the right, the control you checked is "Time Arrived" in the yellow circle, on the contrary, the following control I guess is dtpTimeStart, it can be found that its state is indeed false.

所以确保你改变了控件看着是一样的,请检查一下。

So make sure the control you changed and watched are the same one, please check it.

问候,

Frankie


这篇关于如何检查dateTimePicker复选框的状态的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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