ComponentOne VSView 8.0
GetMargins Method

Returns the printable area, excluding margins, in the X1, Y1, X2, and Y2 properties.

Syntax

[form!]VSPrinter.GetMargins

Remarks

This method provides a convenient way to determine the rectangle defined by the current page size, margins, and current column.

For example, to draw a line across the page (from margin to margin), you could use code such as:

vp.X1 = vp.MarginLeft

vp.X2 = vp.PageWidth - vp.MarginRight

vp.DrawLine vp.X1, y, vp.X2, y

Or you could use the GetMargins method and write:

vp.GetMargins

vp.DrawLine vp.X1, y, vp.X2, y

The second version is more efficient and concise, and it also works when the Columns property is set to a value greater than one.

 

 


Copyright (c) GrapeCity, inc. All rights reserved.

Product Support Forum  |  Documentation Feedback