Having a little trouble with Properties.
Have created a control array of textboxes (as per help file) and can create my textboxes on my form with a common event handler (again as per help file) which seems to access the 'Get' property (text) but am having trouble accessing the set property to write text to the textbox.
Even though the class and property definition are Public I can't seem to find a way of addressing my textboxes from the form1 code or module code.
Anyone got some tips?
Thanks
Loading
Scott LyslePosted Jan 1, 2007, 3:50 AM
Public
Class Form1 Public txtBoxArray() As TextBox Private Sub TextBox_Click(ByVal sender As System.Object, ByVal e As EventArgs)Me.PropertyGrid1.SelectedObject = sender
End Sub Private Sub Form1_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles
Me.Load ReDim txtBoxArray(5)
Dim intTop As Integer = 10
Dim intLeft As Integer = 10
Dim i As Integer For i = 0 To 4
txtBoxArray(i) = New TextBox()
txtBoxArray(i).BackColor = Color.Bisque
txtBoxArray(i).Top = intTop
txtBoxArray(i).Left = intLeft
Me.Panel1.Controls.Add(txtBoxArray(i))
AddHandler txtBoxArray(i).Click, AddressOf TextBox_Click
intTop += 25
Next
End Sub
End Class