textbox name when create programmically
When I create textboxes at run time, how do I know which textbox is which? Here's the code, for example.
Quote:
Dim txtResult As New TextBox()
pnlAppResult.SuspendLayout()
With txtAward
.Width = 80
.Height = awdH
.Location = New Point(awdX, awdY)
.AutoSize = True
.Multiline = True
'.Text = plcHolder
.BackColor = System.Drawing.Color.White
.ReadOnly = True
.Visible = True
.Show()
End With
pnlAppResult.Controls.Add(txtAward)
pnlAppResult.ResumeLayout(True)
This text box is created base on how many results are generated from the database. My problem is if I want to work with the first created textbox, which name do I use to work with because all of the created textboxes are create with the name txtAward. Please help.
Many thanks in advance!
Chong
textbox name when create programmically
Sorry, this line
COLOR=red]Dim txtAward As New TextBox()[/COLOR] should be Dim txtResult As New TextBox()[
Thanks!
Chong