UB-04 Form – Modifying Form Fields Before Printing

Index

    Modifying Form Fields Before Printing

    Certain form fields properties may need slight adjustment before printing. The BeforePrint event will be raised before the form is sent to the printer. Field properties like width, height, x y positions etc can be modified.

    Example

    UB04Form ubForm = new UB04Form();
     
    ubForm.BeforePrint += ubForm_BeforePrint;
     
    private void ubForm_BeforePrint(object sender, FormEventArgs e)
    {
        //e.Cells has all fields that will be send to printer.
        //The field properties can be modified
     
    e.Cells[0].X = 12;
    e.Cells[0].Y = 13;
    e.Cells[1].Width = 3;
    e.Cells[1].Height = 0.5;
    }
    in UB – 04 Form
    Did this article answer your question?