TSRVPrint.CheckMargin

<< Click to display table of contents >>

TSRVPrint.CheckMargin

Compares margins with minimal possible values and returns adjusted values.

function CheckMargin(var NewLeft, NewTop, NewRight, NewBottom: Integer; 

  ALeft, ATop, ARight, ABottom: Integer) : Boolean;

This methods compares the margins specified in ALeft, ATop, ARight, ABottom parameters with minimal margins supported by the current printer.

The results are written to NewLeft, NewTop, NewRight, NewBottom parameters. If the corresponding margin is too small, a minimal supported value is returned. Otherwise, the value of the original parameter is returned.

All values are in pixels.

Any of the input parameters (ALeft, ATop, ARight, ABottom) can be equal to -1. Such parameters are ignored.

This method can be used in TSRichViewEdit.OnMarginsChanged event.