How can I draw a horizontal line at bottom of section with dynamic height?


06-22-2007, 6:06 AM

Since the AnchorBottom property of Line control is used for vertical lines,

the bottom horizontal line can be set for section with dynamic height at run-time only.

The following sample of code shows how section height can be used

in Before Print event for change of line control location:

 

[VB.NET]

 

    Private Sub Detail1_BeforePrint()

        Me.Line1.Y1 = Me.Detail1.Height - 0.01

        Me.Line1.Y2 = Me.Line1.Y1

    End Sub

 

[C#]

 

private void Detail1_BeforePrint()

{

 

Line1.Y1 = Detail1.Height - 0.01f;

Line1.Y2 = Line1.Y1;

 

}