huacw

DateEdit 控件默认情况下,显示的只有日期,没有时间。下面介绍2中日期和时间同时显示的方法:

1.Properties.VistaDisplayMode 为true,

2.Properties.VistaEditTime 为true

3.Properties 下面的

DisplayFormat.FormatString设置为G

EditFormat.FormatString设置为G

4.Properties.EditMask设置为G

这样设置后就会出现图一的 日期时间同时显示的效果。

 

图二,只提供日期选择,而没有时间,具体设置为:

1.

Properties 下面的Tooltip下面的

DisplayFormat.FormatString设置为yyyy-MM-dd hh:mm:ss

EditFormat.FormatString设置为yyyy-MM-dd hh:mm:ss

2

Properties.EditMask设置为yyyy-MM-dd hh:mm:ss

次方法时间必须去输入,而且不能将TextEditStyle设置为Disable TextEditor

 

 

二。TimeEdit控件。

默认情况下 ,该控件只显示时间,没有日期。要显示日期和时间,可以设置 Properties.EditMask 为G 即可。

 

分类:

技术点:

相关文章:

  • 2022-01-02
  • 2021-06-26
  • 2021-06-08
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2021-10-17
  • 2021-11-25
  • 2021-07-15
  • 2022-03-06
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案