Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C#
  4. Closing ComboBox DropDownList Programmatically

Closing ComboBox DropDownList Programmatically

Scheduled Pinned Locked Moved C#
csharpvisual-studioquestion
2 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • F Offline
    F Offline
    freshonlineMax
    wrote on last edited by
    #1

    Hi I know how can i open Combobox dropdown list : ComboBox1.DoDragDrop(); But i want to close it programmatically. I want to use it in my custom UserControl like Visual Studio DateTimePicker control. Clicking on it's ComboBox does't cause to openning dropdown list and just show Date Panel. Tanx.

    J 1 Reply Last reply
    0
    • F freshonlineMax

      Hi I know how can i open Combobox dropdown list : ComboBox1.DoDragDrop(); But i want to close it programmatically. I want to use it in my custom UserControl like Visual Studio DateTimePicker control. Clicking on it's ComboBox does't cause to openning dropdown list and just show Date Panel. Tanx.

      J Offline
      J Offline
      Judah Gabriel Himango
      wrote on last edited by
      #2

      DoDragDrop does not drop down the combo box, it starts a drag-and-drop operation. If you want the combo box list to drop down, use the ComboBox.DroppedDown[^] property. You can close it by setting that property to false, open it by setting the property to true.

      Tech, life, family, faith: Give me a visit. I'm currently blogging about: Passover: Do this in remembrance of Me The apostle Paul, modernly speaking: Epistles of Paul Judah Himango

      1 Reply Last reply
      0
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      • Login

      • Don't have an account? Register

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • World
      • Users
      • Groups