public AufgabenControl(string text, int left, int top, int width, int height, Control parent) : base(text, left, top, width, height) { cParent = parent; gbAufgabe = new GroupBox(); gbAufgabe.Text = text; gbAufgabe.SetBounds(left, top, width, height); gbAufgabe.MouseDown += GbAufgabe_MouseDown; gbAufgabe.MouseUp += GbAufgabe_MouseUp; gbAufgabe.Click += GbAufgabe_Click; gbAufgabe.MouseMove += GbAufgabe_MouseMove; lAufgabenText = new Label(); lAufgabenText.Top = 30; lAufgabenText.AutoSize = true; lAufgabenText.Left = 9; lKontakt = new Label(); lKontakt.Top = 30; lKontakt.Left = 157; lKontakt.AutoSize = true; lStartDatum = new Label(); lStartDatum.Top = 59; lStartDatum.Left = 157; lStartDatum.AutoSize = true; lEndDate = new Label(); lEndDate.Top = 85; lEndDate.Left = 157; lEndDate.AutoSize = true; lTimeLeft = new Label(); lTimeLeft.Top = 112; lTimeLeft.Left = 157; lTimeLeft.AutoSize = true; lbSubItems = new ListBox(); lbSubItems.Top = 18; lbSubItems.Left = 223; lbSubItems.Size = new Size(120, 121); bEdit = new Button(); bEdit.Text = "Bearbeiten"; bEdit.Size = new Size(75, 23); bEdit.Top = 112; bEdit.Left = 369; bEdit.Click += BEdit_Click; gbAufgabe.Controls.Add(bEdit); gbAufgabe.Controls.Add(lAufgabenText); gbAufgabe.Controls.Add(lKontakt); gbAufgabe.Controls.Add(lStartDatum); gbAufgabe.Controls.Add(lEndDate); gbAufgabe.Controls.Add(lTimeLeft); gbAufgabe.Controls.Add(lbSubItems); gbAufgabe.CreateControl(); parent.Controls.Add(gbAufgabe); }