TechMonster
asked on
Dynamically create text boxes to a new panel
Hello again everyone.
Have a code to dynamically create text boxes. It puts it on the main form. I need it to go to
a new panel.
Howz do you do it?
Have a code to dynamically create text boxes. It puts it on the main form. I need it to go to
a new panel.
Howz do you do it?
if you need to create the panel aswell
Dim pnl As New Panel
pnl.BorderStyle = BorderStyle.FixedSingle
pnl.Height = 100
pnl.Width = 100
Me.Controls.Add(pnl)
Dim txt As New TextBox
txt.Height = 19
txt.Width = 80
pnl.Controls.Add(txt)
Dim pnl As New Panel
pnl.BorderStyle = BorderStyle.FixedSingle
pnl.Height = 100
pnl.Width = 100
Me.Controls.Add(pnl)
Dim txt As New TextBox
txt.Height = 19
txt.Width = 80
pnl.Controls.Add(txt)
ASKER
Is there anyway to use the UI to create the panel and link the newly created textboxes to it?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
is that what you were looking for?
ASKER
Yep
txt.Height = 19
txt.Width = 80
Me.Panel1.Controls.Add(txt