Hello everybody,
i am working on vb.net windows applcations.
I am able to programmaticall y add textboxes to my form as needed, but what I would like to be able to do is add my textboes in a particular order.I assume that a tableLayoutPane l has some form of row / column coordinate system for addressing each cell but I'm not having any luck in figuring it out.
Does anyone have any ideas how I might go about this. Thank you for your help.
The code i wrote for doing this is
tp1.Controls.Cl ear()
Dim i As Integer
Dim j As Integer
Dim k As Integer
tp1.RowCount = tb1.Text
tp1.ColumnCount = tb2.Text
'dgv1.RowCount = tb1.Text
'dgv1.ColumnCou nt = tb2.Text
For i = 0 To tb1.Text - 1 Step 1
For j = 0 To tb2.Text - 1 Step 1
Dim tb As New TextBox
tp1.Controls.Ad d(tb, j, i)
Next
Next
Here tp1 means tablelayoutpane l..The rows and columns of this tp1 is taken from two textboxes.It works fine.. but the textboxes are not arranged in a proper way.
_______________ __
i am working on vb.net windows applcations.
I am able to programmaticall y add textboxes to my form as needed, but what I would like to be able to do is add my textboes in a particular order.I assume that a tableLayoutPane l has some form of row / column coordinate system for addressing each cell but I'm not having any luck in figuring it out.
Does anyone have any ideas how I might go about this. Thank you for your help.
The code i wrote for doing this is
tp1.Controls.Cl ear()
Dim i As Integer
Dim j As Integer
Dim k As Integer
tp1.RowCount = tb1.Text
tp1.ColumnCount = tb2.Text
'dgv1.RowCount = tb1.Text
'dgv1.ColumnCou nt = tb2.Text
For i = 0 To tb1.Text - 1 Step 1
For j = 0 To tb2.Text - 1 Step 1
Dim tb As New TextBox
tp1.Controls.Ad d(tb, j, i)
Next
Next
Here tp1 means tablelayoutpane l..The rows and columns of this tp1 is taken from two textboxes.It works fine.. but the textboxes are not arranged in a proper way.
_______________ __
Comment