Beispiel #1
0
 private void AddButton(string name)
 {
     if (buttonPanel == null)
     {
         buttonPanel = new FlowLayoutPanel() { Name = "Buttons", FlowDirection = FlowDirection.TopDown, WrapContents = false };
         var tp = new TabPage("Buttons");
         tabControl1.TabPages.Add(tp);
         tp.Controls.Add(buttonPanel);
         buttonPanel.Dock = DockStyle.Fill;
     }
     JoyButton b = new JoyButton();
     b.Name = name;
     b.Caption = name;
     buttonPanel.Controls.Add(b);
 }