|
-
Apr 21st, 2003, 09:27 AM
#1
Thread Starter
Addicted Member
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.
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
-
Apr 21st, 2003, 09:29 AM
#2
Thread Starter
Addicted Member
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
-
Apr 21st, 2003, 09:54 AM
#3
Sleep mode
You never specified a name for your textbox . Set .Name Property to your control created at runtime .
-
Apr 21st, 2003, 09:57 AM
#4
Thread Starter
Addicted Member
Thanks! I'll give that a try.
Chong
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|