Visual Basic 2005组合框 [英] Visual Basic 2005 Combobox

查看:104
本文介绍了Visual Basic 2005组合框的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何将日历分配给组合框并选择当前日期,但允许用户选择其他日期?

How do I assign a calendar to a combobox and have the current date selected but allow user to pick other dates?

推荐答案

使用DateTimePicker控制(查看设计器模式下的工具箱).
它基本上是一个带有日历的组合框.

还有MonthCalendar控件,该控件不具有时间功能,但仅用于日期.

希望对您有所帮助!
Use the DateTimePicker contol (look at the toolbox in Designer mode).
It''s basically a combobox with a calendar.

There''s also the MonthCalendar control, which does not have the time feature, but is only for dates.

Hope this helps!


您为什么要这么做?

DateTimePicker已经存在,可以轻松使用MonthCalendar.

它们都易于编辑,并提供功能.

或者,您可以为此自定义创建一个组合框,但是众所周知,日期很难做到.
Why would you want to?

The DateTimePicker is already there, and MonthCalendar, either can be used easily.

They are both easily editable, and provide the funtionality.

Alteratively you can custom create a combo box for this, but dates are notoriously difficult to do.


这篇关于Visual Basic 2005组合框的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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