JohnDW
Well-known member
Hello,
I'm looking for some help.
In a form that I want to
print,
I have a datagridview (gets filled with a loop)
that increases (growing in height) if new rows are added.
The problem I have is: the form doesn't increase, the datagridview does
That part of code resizes the datagridview in the form : this works!
. I'll tried to do resize the form with
.
BUt this doesn't work.
The question is how do I make the form height grow within this loop,
also some label on the bottom of the form must be resized according the
grow of the datagridview.
(lblLine.Height , lblOk.Height , lblThank.Height ).
I would be grateful.
Txs.
I'm looking for some help.
In a form that I want to
print,
I have a datagridview (gets filled with a loop)
that increases (growing in height) if new rows are added.
VB.NET:
Do While dr.Read = True
dgw.Rows.Add(dr("Aantal"), dr("Productomschrijving"), dr("CategorieId"), dr("Maatid"), dr("Verkoopprijs"), dr("TotalPrice"))
dgw.Height += 19 'this resizes the datagridview in the form : this works!
x += 19 'should resize the form height (but doesn't)
ActiveForm.Height += 19 'try to resize the form height (but doesn't work also)
lblLine.Height += 19 '(those labels should move according to the growth of the datagridview
lblOk.Height += 19 'doesn't work also
lblThank.Height += 19 'doesn't work also
Loop
The problem I have is: the form doesn't increase, the datagridview does
VB.NET:
dgw.Height += 19
. I'll tried to do resize the form with
VB.NET:
ActiveForm.Height += 19
BUt this doesn't work.
The question is how do I make the form height grow within this loop,
also some label on the bottom of the form must be resized according the
grow of the datagridview.
(lblLine.Height , lblOk.Height , lblThank.Height ).
I would be grateful.
Txs.