I have a datatable
that looks like the following:
Room Cook Waiter BG_Image
----------------------------------
201 Joe Jim Green.png
Here's some VB code to add an array of textboxes to a FlowLayoutPanel:
Sub AddMany(cols As Integer, rows As Integer)
Dim txt As TextBox
FlowLayoutPanel1.FlowDirection = FlowDirection.LeftToRight
FlowLayoutPanel1.AutoScroll = True
For y As Integer = 0 To rows - 1
For x As Integer = 0 To cols - 1
If Not (x = 0 And y = 0) Then
txt = New TextBox
txt.Text = "txt_" & y & "_" & x
txt.Name = "txt_" & y & "_" & x
FlowLayoutPanel1.Controls.Add(txt)
AddHandler txt.KeyDown, AddressOf MoveKeyDown
AddHandler txt.DoubleClick, AddressOf ShowMeta
End If
Next
FlowLayoutPanel1.SetFlowBreak(txt, True)
Next
End Sub
Instead of simple TextBoxes you could add Buttons with images or PictureBoxes. You'd have to paint the text onto the images - or use a custom control.