Y New Class. How can i made it?

Hello,

i want make a Control for me. A Control what have some Panels inside. (like TableLayoutPanel).

The Panel at Top have a Label inside that shows the Caption.

The Panel at bottom you can use as Panel and can have other controls inside.

I made one with a UserControl. But the BottomPanel don’t want work. I can’t put other controls inside.

How can i do this

Thanks



Answer this question

Y New Class. How can i made it?

  • Simfool

    Add this code on the header of the UserControl:

    [Designer("System.Windows.Forms.Design.ParentControlDesigner, System.Design", typeof(IDesigner))]

    public partial class UserControl1 : UserControl

    {

    }

    This will allow you to add controls to your UserControl at desing time



  • Dale Computer Help

    You need to add a reference to

    System.ComponentModel, than you will see the proprty (after 'resolve' on the Desinger).



  • arktseytlin

    Hi, thanks for ask, but a new question i have. My VB Express don’t won’t attribute like Designer.

    What must i do


  • JoeeT

    If you want it to act like a panel, you can write:

    public class MyControl : Panel

    instead of

    public class MyControl : UserControl

    I hope that is your question....



  • Rok Yu

    Thanks, thats work. Now (i hope) the last question.

    How can i do it, that i can only add at one of the panel the components and not at the full UserControl


  • Y New Class. How can i made it?