Reputation: 57
i tried to use panels in each cells but the picturebox still wont move to another cell. thanks
Upvotes: 1
Views: 2140
Reputation: 14781
Use the following:
tableLayoutPanel.Controls.Remove(button1);
// then:
tableLayoutPanel.Controls.Add(pictureBox, columnIndex, rowIndex);
Read about TableLayoutPanel:
TableLayoutPanel tutorial on csharp-online.net
If you wanted to implement Drag and Drop, you may get used from the following references:
A Simple Drag And Drop How To Example
Upvotes: 1