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. How to create a container control

How to create a container control

Scheduled Pinned Locked Moved C#
tutorialdockerhelp
2 Posts 2 Posters 1 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
    Fairytale
    wrote on last edited by
    #1

    Hi folks, I recently stumbled about an annoying problem while designing components: It just seems impossible to me to create a control that allows other controls to be put upon at designtime. As far as I understood the MSDN every control derived from UserControl has the ability to support child controls. That works ok when adding controls simply by code but I can't add them using the designer. I tried to set AllowDrop to true and played around with the DragDrop events. The problem is I didn't found a way to extract the control from the DragEventArgs parameter (if it is there at all). :confused: Would be great if anybody could tell me how to create a control that act like the GroupBox for example, including visual component adding. Thanks in advance, Matthias

    M 1 Reply Last reply
    0
    • F Fairytale

      Hi folks, I recently stumbled about an annoying problem while designing components: It just seems impossible to me to create a control that allows other controls to be put upon at designtime. As far as I understood the MSDN every control derived from UserControl has the ability to support child controls. That works ok when adding controls simply by code but I can't add them using the designer. I tried to set AllowDrop to true and played around with the DragDrop events. The problem is I didn't found a way to extract the control from the DragEventArgs parameter (if it is there at all). :confused: Would be great if anybody could tell me how to create a control that act like the GroupBox for example, including visual component adding. Thanks in advance, Matthias

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

      Replace : System.Windows.Forms.UserControl with : System.Windows.Forms.ContainerControl

      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