I have to create a form capable of displaying a cinema-hall (don\'t know the exact word) schema. Essentially I have to display a large number (given by another source) of indepe
I'd say that the easiest way would be to create and own "chair-control" which handles it's click event etc. This would be nothing more than a simple User-Defined Control which has the chair image as background (and swaps with other pictures, if necessary).
After that, you could easily create a big punch of these controls by code (Pseudo-Code):
for(int row = 0; row < rowMax; row++) {
for(int column = 0; column < columnMax; column++) {
this.Controls.Add(New ChairControl(row, column));
}
}
The constructor takes the row and column number and automatically adjusts it's position, f.e..