Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

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

Posted

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

  • *Experts*
Posted

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

"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
Posted

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

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...