Results 1 to 3 of 3

Thread: Time Picker ComboBox

  1. #1

    Thread Starter
    Karen Payne MVP kareninstructor's Avatar
    Join Date
    Jun 2008
    Location
    Oregon
    Posts
    6,713

    Time Picker ComboBox

    .NET Framework has a DateTimePicker but not a control to work with TimeSpan which is what TimePickerComboBox was created for.

    Developed with .NET Core 5.

    Simple example with using a data source

    Name:  TimeComboBox.png
Views: 772
Size:  16.9 KB


    Example use SQL-Server

    Name:  TimeComboBoxData.png
Views: 749
Size:  8.8 KB

    Full source in the following GitHub repository which can be cloned or forked.

    Also include are the following language extension methods

    Name:  DateTimeEx.png
Views: 769
Size:  34.8 KB

  2. #2
    Super Moderator jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    111,221

    Re: Time Picker ComboBox

    Quote Originally Posted by kareninstructor View Post
    .NET Framework has a DateTimePicker but not a control to work with TimeSpan
    That's not completely true. You can work directly with the time portion of a DateTime in a DateTimePicker. You can use a time-specific format and set ShowUpDown to True, but there's no drop-down option like you're providing.
    Why is my data not saved to my database? | MSDN Data Walkthroughs
    VBForums Database Development FAQ
    My CodeBank Submissions: VB | C#
    My Blog: Data Among Multiple Forms (3 parts)
    Beginner Tutorials: VB | C# | SQL

  3. #3

    Thread Starter
    Karen Payne MVP kareninstructor's Avatar
    Join Date
    Jun 2008
    Location
    Oregon
    Posts
    6,713

    Re: Time Picker ComboBox

    Quote Originally Posted by jmcilhinney View Post
    That's not completely true. You can work directly with the time portion of a DateTime in a DateTimePicker. You can use a time-specific format and set ShowUpDown to True, but there's no drop-down option like you're providing.
    Agree in regards to you can work directly with the time portion via a DateTimePicker.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width