Results 1 to 4 of 4

Thread: Container Control

  1. #1

    Thread Starter
    Member
    Join Date
    Mar 1999
    Location
    España
    Posts
    45

    Container Control

    Hello,

    I want to make a usercontrol and I need to put some controls inside it. But this controls have to be added on design mode by the programmer. In VB 6.0 there were a property named ControlContainer and the controls added by the user were put on a Controls collection.

    Do you know how to build this kind of feature.

    Please help me, I'm getting crazy.

  2. #2
    old fart Frans C's Avatar
    Join Date
    Oct 1999
    Location
    the Netherlands
    Posts
    2,926
    How about inheriting System.Windows.Forms.ContainerControl?

  3. #3

    Thread Starter
    Member
    Join Date
    Mar 1999
    Location
    España
    Posts
    45
    I've tried it but itmakes an error because UserControl inherits ContainerControl and it is implicit to mine.

  4. #4
    old fart Frans C's Avatar
    Join Date
    Oct 1999
    Location
    the Netherlands
    Posts
    2,926
    If you put all the constituent controls on your usercontrol at runtime, you could remove the usercontrol class, and add another class that inherits the containercontrol.
    I don't know if it will work, but you could give it a try.

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