How can I insert a DateTimePicker in menu and allow user to choose a value?
I want to have the DateTimePicker in menu like "Generate report as on 10-Jan-11". Here I should be able to choose the date from the DateTimePicker and 开发者_如何学Pythonclose the menu.
I searched the Internet, but I could not find a way to do this. Thanks a lot.
Change your menu item to read something like: "Generate Report...", then when the user clicks on that, show a dialog box that contains a DateTimePicker
control and allows them to choose the specific dates for which they'd like a report.
For example:
Don't abuse menus for things they're not designed for. That just makes your user interface clunky and difficult to navigate. Most users find it difficult to interact with complex controls in a menu without accidentally dismissing the menu itself.
It's called Windows Forms because you're supposed to create forms that the user interacts with. Windows Menus hasn't been released yet.
For some applications it's appropriate to add a list of human friendly dates and times to a menu.
For example in my application I allow users to snooze a task and provide a way to quickly pick a date and time like so:
精彩评论