我想实现一个功能,当点击datetimepicker的checkbox,让checked=true时显示日期,当checked=false时隐藏日期。本来我想在datetimepicker的checkedchanged事件里写:
当为false时,执行:
this.dateTimePicker1.Format=DateTimePickerFormat.Custom;
this.dateTimePicker1.CustomFormat=" ";
让其为空。
当为true时,执行:
this.dateTimePicker1.Format=DateTimePickerFormat.Long;
this.dateTimePicker1.CustomFormat=null;
让其恢复正常。
但是找了半天都没找到datetimepicker的checkedchanged事件。请问各位高手该如何处理!小弟不胜感激!
当为false时,执行:
this.dateTimePicker1.Format=DateTimePickerFormat.Custom;
this.dateTimePicker1.CustomFormat=" ";
让其为空。
当为true时,执行:
this.dateTimePicker1.Format=DateTimePickerFormat.Long;
this.dateTimePicker1.CustomFormat=null;
让其恢复正常。
但是找了半天都没找到datetimepicker的checkedchanged事件。请问各位高手该如何处理!小弟不胜感激!
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货