PrinterSetup.Height

From Xojo Documentation

Revision as of 13:54, 26 July 2019 by Gperlman (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

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

Supported for all project types and targets.

The height of the printable area on the page (in pixels). The height is the PageHeight minus the margins.

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.

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

Label1.Value = "PageLeft=" + p.PageLeft.ToString
Label2.Value = "PageTop=" + p.PageTop.ToString
Label3.Value = "PageHeight=" + p.PageHeight.ToString
Label4.Value = "PageWidth=" + p.PageWidth.ToString
Label5.Value = "Height=" + p.Height.ToString
Label6.Value = "Width=" + p.Width.ToString
Label7.Value = "Computed height=" + Str(p.Height - 2 * p.PageTop)
Label8.Value = "Computed width=" + Str(p.Width - 2 * p.PageLeft)