PrinterSetup.Left

From Xojo Documentation

Revision as of 19:38, 2 August 2017 by PLefebvre (talk | contribs) (Example)

Read-Only Property (As Integer )
IntegerValue = aPrinterSetup.Left

Supported for all project types and targets.

The left origin of the printable area.

This should always be zero.

Example

This example displays the Page Setup box and then displays the page size, printable area, and margins in Label controls. Results, of course, depend on the page size that the user selects. Since PageLeft and PageTop are the horizontal and vertical margins as measured from the printable area rather than the edge of the page, they are negative.

Dim settings As String
Dim p As New PrinterSetup
If p.PageSetupDialog Then
settings = p.SetupString
End If

Label1.Text = "PageLeft=" + Str(p.PageLeft)
Label2.Text = "PageTop=" + Str(p.PageTop)
Label3.Text = "PageHeight=" + Str(p.PageHeight)
Label4.Text = "PageWidth=" + Str(p.PageWidth)
Label5.Text = "Height=" + Str(p.Height)
Label6.Text = "Width=" + Str(p.Width)
Label7.Text = "Computed height=" + Str(p.Height - 2 * p.PageTop)
Label8.Text = "Computed width=" + Str(p.Width - 2 * p.PageLeft)
Label9.Text = "Horizontal resolution=" + Str(p.HorizontalResolution)
Label10.Text = "Vertical Resolution=" + Str(p.VerticalResolution)
Label11.Text = "Left=" + Str(p.Left)