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. Creating a custom Combobox control

Creating a custom Combobox control

Scheduled Pinned Locked Moved C#
tutorialquestion
3 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.
  • B Offline
    B Offline
    bjoernen
    wrote on last edited by
    #1

    Is it possible to create a custom drop down control much like the existing Combobox, but with my own content on the drop down area? I have special needs, for instance to include a Textbox and a Button on the drop down area. I cant figure out what kind of window the drop down area is. It must be a window since it can cross the parent form boundaries, but at the same time it doesn't remove the focus from the parent window so it acts like a regular form control. To create such a "hybrid", do I have to use the NativeWindow class, or has it all to do with redirecting window messages from the popup window to the parent window? The ideal situation would be to have some kind of free floating "PopupPanel" control that could be added to a form, but that isn't restricted to parent form boundaries. Any clues on how to write such a control? Regards, Björn Morén Stockholm, Sweden

    M 1 Reply Last reply
    0
    • B bjoernen

      Is it possible to create a custom drop down control much like the existing Combobox, but with my own content on the drop down area? I have special needs, for instance to include a Textbox and a Button on the drop down area. I cant figure out what kind of window the drop down area is. It must be a window since it can cross the parent form boundaries, but at the same time it doesn't remove the focus from the parent window so it acts like a regular form control. To create such a "hybrid", do I have to use the NativeWindow class, or has it all to do with redirecting window messages from the popup window to the parent window? The ideal situation would be to have some kind of free floating "PopupPanel" control that could be added to a form, but that isn't restricted to parent form boundaries. Any clues on how to write such a control? Regards, Björn Morén Stockholm, Sweden

      M Offline
      M Offline
      MoustafaS
      wrote on last edited by
      #2

      What about trying to have a regular dropdown with a hidden panel (which the hiddenpanel will contain all the controls you with to show )and in the event of dropin gthe combo ,show the panel. ByMindOnlyYouCanDoIt

      B 1 Reply Last reply
      0
      • M MoustafaS

        What about trying to have a regular dropdown with a hidden panel (which the hiddenpanel will contain all the controls you with to show )and in the event of dropin gthe combo ,show the panel. ByMindOnlyYouCanDoIt

        B Offline
        B Offline
        bjoernen
        wrote on last edited by
        #3

        Then the panel would no be able to be shown outside the parent form boundaries, for instance sticking out over the bottom edge of the parent window. I got help from Tim Wilson to find this article that solved my problem: http://vbaccelerator.com/home/NET/Code/Controls/Popup_Windows/Popup_Windows/article.asp[^] Regards, Björn Morén Stockholm, Sweden

        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