namespace TableLayoutPanelImage { public partial class Form1 : Form { public Form1() { InitializeComponent(); } private const int MAX_ROW = 110; private void Form1_Load(object sender, EventArgs e) { TableLayoutPanel tlp = new TableLayoutPanel(); tlp.Dock = DockStyle.Top; tlp.AutoSize = true; tlp.AutoSizeMode = AutoSizeMode.GrowAndShrink; tlp.AutoScroll = false; tlp.CellBorderStyle = TableLayoutPanelCellBorderStyle.Single; tlp.RowCount = MAX_ROW; tlp.Parent = this.panel1; for (int i = 0; i < MAX_ROW; i++) { // tlp.Controls.Add(new PictureBox() { Size = new Size(300, 300), BackColor = Color.DimGray, BorderStyle = BorderStyle.FixedSingle, Parent = tlp } , 0, i+1); } } } }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)