Results 1 to 4 of 4

Thread: User Controls and Control Containers

  1. #1

    Thread Starter
    Frenzied Member Ideas Man's Avatar
    Join Date
    Aug 2002
    Location
    Australia
    Posts
    1,718

    User Controls and Control Containers

    I have just created a new user control and I am pretty new to this topic.
    I can easily drag and drop controls onto the user control at design time, so no problems there, but when I goto do the same in another project that references the control library .dll, it doesn't work.

    How can I make my user control become a control library, a bit like the groupbox accepts controls when it is being used as a control in another project?
    I use Microsoft Visual Basic 2005. (Therefore, most code samples I provide will be based around the .NET Framework v2.0, unless otherwise specified)

  2. #2
    type Woss is new Grumpy; wossname's Avatar
    Join Date
    Aug 2002
    Location
    #!/bin/bash
    Posts
    5,682

    Re: User Controls and Control Containers

    What do you mean it doesn't work? Do you mean you can't access your user control at all (can't get it onto the form) or just that you can't drag other controls into it?

    I don't live here any more.

  3. #3

    Thread Starter
    Frenzied Member Ideas Man's Avatar
    Join Date
    Aug 2002
    Location
    Australia
    Posts
    1,718

    Re: User Controls and Control Containers

    I can't drag other controls into it. They are still part of the form, not the user control.
    I use Microsoft Visual Basic 2005. (Therefore, most code samples I provide will be based around the .NET Framework v2.0, unless otherwise specified)

  4. #4

    Thread Starter
    Frenzied Member Ideas Man's Avatar
    Join Date
    Aug 2002
    Location
    Australia
    Posts
    1,718

    Re: User Controls and Control Containers

    Update:

    I changed the inheritance to say Inherits System.Windows.Forms.Panel and it allows me to drop controls into the UserControl in the IDE now, however, any other controls such as the panel control still don't present this behaviour if they are children of the UserControl.

    The problem is I don't want to be able to drop controls anywhere in the UserControl, only a specified region, one specified with a panel control.

    Does anyone know how I can get a Panel control that is a child of a UserControl to accept controls and hold them in it's container?
    Last edited by Ideas Man; Mar 18th, 2005 at 05:14 AM.
    I use Microsoft Visual Basic 2005. (Therefore, most code samples I provide will be based around the .NET Framework v2.0, unless otherwise specified)

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