OwnerDraw 日期时间选择器
我想使用 MonthPicker 而不是 DateTimePicker,它的实现与 DateTimePicker 完全相同,除了下拉面板仅显示月份和年份选择(而不是天、月和年) - 我无法发布任何内容图像作为一个新手在这里,虽然我做了一个:(
有没有什么方法可以覆盖 DateTimePicker 渲染(ownerdraw 有点东西),或者如果不可能的话,重现 DateTimePicker 行为的最佳方法是什么?
I'd like to use a MonthPicker instead of a DateTimePicker, that will have exactly the same implementation as the DateTimePicker except for the dropdown panel that would only show months and year selection (instead of days, months and year) - I cannot post any image as a newbee here, though I made one :(
Is there any way to override DateTimePicker rendering (ownerdraw kinda stuff) or what would be the best way to reproduce the DateTimePicker behavior if this is not possible ?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
我希望这就是您想要的
Showupdown 将禁用显示日历的下拉列表,如果您只对月份和年份设置感兴趣
CustomFormat =“mm/yyyy”
I hope this is what you want
Showupdown will disable the dropdown showing the calender, if you are interested only in month and year set
CustomFormat = "mm/yyyy"
有关信息,我在这里找到了关于同一主题的另一个讨论:
显示带有派生日历的自定义日历下拉列表DateTimePicker类
For information, I found another discussion on the same subject here :
Show a custom calendar dropdown with a derived DateTimePicker class