does it make a difference if you usesadams54 wrote: ↑Thursday 26th August 2021 11:31pm I got the dynamic creation of everything figured out and working. Thank you guys very much. Thank you both for the examples they helped.
My next 2 issues are hopefully simple.
How do I create a control array? This is rather important for this project.
the 2nd is in the event handler. following cogier's example I have the following code and it worked at first then stopped working so wondering what I am doing wrong. when I click the button nothing happens.
Public Sub Testbutton_Click()
message(Last.Name)
End
Public Sub MakeChangeCamNameButton(cTab As Integer)
Dim P As New Panel(tCam[cTab])
P.Name = "p" & Str(cTab)
P.AutoResize = False
Dim B1 As New Button(P) As "Testbutton"
B1.Width = 160
B1.Height = 32
B1.X = 568
B1.Y = 16
B1.Name = "btnChangeCamName" & Str(cTab)
B1.Text = "Change Cam Name"
End
Dim P As Panel = New Panel(tCam[cTab])
and
Dim B1 As Button = New Button(P) As "Testbutton"
An array of controls can be made like this..
Dim MyControls as New Control[]
Mycontrols.Add(Button1)
etc, etc
Or
Dim MyContorls As New Object[]