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
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. General Programming
  3. Windows Forms
  4. User Control with container area? [modified]

User Control with container area? [modified]

Scheduled Pinned Locked Moved Windows Forms
csharphelpwinformsdocker
5 Posts 3 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.
  • M Offline
    M Offline
    MrBean
    wrote on last edited by
    #1

    Hi, I'm developing a WinForms (VB.NET 2.0) application where I have a user control which contains several fixed controls (toolstrip, buttons, panels, etc.). This works just fine - the problem is that I want one (and only one) Panel control within my user control to act as a container where other controls can be placed in the form designer. I can set a designer attribute for the entire user control which causes the entire user control to be a container - but I only want one specific Panel control in the user control to act as a container. How can this be done? Please help, TIA :) /B -- modified at 5:29 Thursday 13th September, 2007

    L P 2 Replies Last reply
    0
    • M MrBean

      Hi, I'm developing a WinForms (VB.NET 2.0) application where I have a user control which contains several fixed controls (toolstrip, buttons, panels, etc.). This works just fine - the problem is that I want one (and only one) Panel control within my user control to act as a container where other controls can be placed in the form designer. I can set a designer attribute for the entire user control which causes the entire user control to be a container - but I only want one specific Panel control in the user control to act as a container. How can this be done? Please help, TIA :) /B -- modified at 5:29 Thursday 13th September, 2007

      L Offline
      L Offline
      Lutoslaw
      wrote on last edited by
      #2

      MrBean wrote:

      I can set a designer attribute for the entire user control which causes the entire user control to be a container

      My reply is off-topic a bit, but I have a problem. Please take a look: http://www.codeproject.com/script/comments/forums.asp?msg=2202335&forumid=1649&XtraIDs=1649&sd=15+Jun+2007&ed=13+Sep+2007&author=gajatko&stype=1#xx2202335xx It looks like you know how to make a user control to act as a container. Please help! Thanks in advance...

      Greetings - Gajatko Portable.NET is part of DotGNU, a project to build a complete Free Software replacement for .NET - a system that truly belongs to the developers.

      M 1 Reply Last reply
      0
      • L Lutoslaw

        MrBean wrote:

        I can set a designer attribute for the entire user control which causes the entire user control to be a container

        My reply is off-topic a bit, but I have a problem. Please take a look: http://www.codeproject.com/script/comments/forums.asp?msg=2202335&forumid=1649&XtraIDs=1649&sd=15+Jun+2007&ed=13+Sep+2007&author=gajatko&stype=1#xx2202335xx It looks like you know how to make a user control to act as a container. Please help! Thanks in advance...

        Greetings - Gajatko Portable.NET is part of DotGNU, a project to build a complete Free Software replacement for .NET - a system that truly belongs to the developers.

        M Offline
        M Offline
        MrBean
        wrote on last edited by
        #3

        Getting a user control to act as a container is pretty easy : After creating a user control in VS 2005, the class code should look something like this: Public Class MyUserControl1 End Class Just add the following attribute to the class : < System.ComponentModel.Designer("System.Windows.Forms.Design.ParentControlDesigner, System.Design", GetType(IDesigner)) > _ Public Class MyUserControl1 End Class That should do the trick ;) If you (or anybody else) find a solution to my problem (read my first post in this thread), please let me know... PLEEEEEESE ;) /B

        1 Reply Last reply
        0
        • M MrBean

          Hi, I'm developing a WinForms (VB.NET 2.0) application where I have a user control which contains several fixed controls (toolstrip, buttons, panels, etc.). This works just fine - the problem is that I want one (and only one) Panel control within my user control to act as a container where other controls can be placed in the form designer. I can set a designer attribute for the entire user control which causes the entire user control to be a container - but I only want one specific Panel control in the user control to act as a container. How can this be done? Please help, TIA :) /B -- modified at 5:29 Thursday 13th September, 2007

          P Offline
          P Offline
          Patrick Etc
          wrote on last edited by
          #4

          Take a look at my TaskPane control, here: http://www.codeproject.com/useritems/MSOfficeTaskPane.asp[^] It does what you're asking. You can see how to set up the designer control properties to get everything to behave the way you want.


          The early bird who catches the worm works for someone who comes in late and owns the worm farm. -- Travis McGee

          M 1 Reply Last reply
          0
          • P Patrick Etc

            Take a look at my TaskPane control, here: http://www.codeproject.com/useritems/MSOfficeTaskPane.asp[^] It does what you're asking. You can see how to set up the designer control properties to get everything to behave the way you want.


            The early bird who catches the worm works for someone who comes in late and owns the worm farm. -- Travis McGee

            M Offline
            M Offline
            MrBean
            wrote on last edited by
            #5

            Thanks for your post, but it doesn't help me. I only need a user control (not a custom control) where I can control which panel is the container for the .NET form designer. Also seems like the entire Taskpane control acts like the container and not just a limited area within (panel)... controls can be resized and moved to overlap the toolbarfor example. /B

            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