Chong Posted July 30, 2003 Posted July 30, 2003 Anyone know a way to prevent the DateTimePicker from having the right drop down arrow? I want to use the DateTimePicker as a Time and so I don't want to have the drop down as an option. Many thanks for the help! ljCharlie Quote
Chong Posted July 30, 2003 Author Posted July 30, 2003 If it's possible, how do I format the DateTimePicker to have a drop down that looks like the one MS Outlook appointment uses? In MS Outlook under the appointment, the time drop down only display the time or hour and not day, month, and year. Anyone know how this can be done? aljCharlie Quote
*Experts* Nerseus Posted July 31, 2003 *Experts* Posted July 31, 2003 To have the DateTimePicker show only the time, change the Format to Time. I know of no way to get the DateTime picker to display a drop down with the time in it - it only shows the Calendar control (even if you specify the Format as Time). The dropdown used in Outlook isn't using the DateTimePicker afaik. You can tell because the button to the right is a separate button, not part of the actual control. I would guess they're just looping and filling a Combobox (or something similar) with the time values they want. As far as removing the drop-down button, the closest I can see is setting ShowUpDown to True, which changes the DropDown button to two of the tiniest up/down buttons I've ever seen. If you're really pressed for space and want to remove the button to save 16 pixels (or whatever the width is), you *might* be able to remove the button using the API. But I would definitely NOT try that unless *absolutely* necessary. And I don't think you'll find much help on how to do it. -Nerseus Quote "I want to stand as close to the edge as I can without going over. Out on the edge you see all the kinds of things you can't see from the center." - Kurt Vonnegut
Chong Posted August 5, 2003 Author Posted August 5, 2003 Thank you very much for your help. I was able to get it closer to what I need now. By using the ShowUpDown, I was able to get rid of the dropdown arrow. This ShowUpDown helps a lot. Many thanks for your contribution. ljCharlie Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.