private void button1_Click_1(object sender, EventArgs e) { flowLayoutPanel1.Controls.Clear(); root = textBox1.Text; dirs = new List <string>(System.IO.Directory.EnumerateDirectories(root)); int index = 0; foreach (string dir in dirs) { System.Windows.Forms.Button button; button = new folderButton(dir, pictureBox1, mnemonics[index].ToString(), this); flowLayoutPanel1.Controls.Add(button); index++; } actionButton nextButton = new actionButton("+", actionButton.NEXT, this); actionButton prevButton = new actionButton("0", actionButton.PREVIOUS, this); flowLayoutPanel1.Controls.Add(nextButton); flowLayoutPanel1.Controls.Add(prevButton); fileIndex = 0; loadImage(); }
private void buttonDemo() { System.Windows.Forms.Button button; button = new folderButton("c:\\test\\", pictureBox1, "1", this); flowLayoutPanel1.Controls.Add(button); }