Creating a textbox array

you can create a control set here.
so one name for all and the events have an index.
(the name should not have an number, and not the class name)

grafik

example for creating an label at runtime

Var label As New DesktopLabel
label.Text = row.ColumnAt(c).Name
label.Left = x
label.Top = y
label.Width = Self.Width
label.Height = h
label.Enabled =True
label.Visible =True

Self.AddControl(label)

y=y+h+sp
1 Like

Docs for @MarkusR’s suggestion of using a Control Set:

https://documentation.xojo.com/topics/user_interface/sharing_event_handlers_with_control_sets.html#topics-user-interface-desktop-control-sets-creating-new-controls-in-a-control-set-via-code