GetLayout Method

Build 1501 on 14/Nov/2017  This topic last edited on: 23/Mar/2016, at 12:14

Description

Returns the page layout object.

Syntax

Dim layout As FredLayout = Page.GetLayout()

Dim layout = pageDesigner.Doc.GetView().GetLayout()

Dim layout = FredApp.ActivePageDispatcher.GetLayou

Example

  <ShellCommand(CanExecute:="Ena_IsWindowActive")> _

  Public Sub LayoutFitToPage()

    Dim layout As FredLayout = Page.GetLayout()

    If layout.GetMetrics(1) > 1000 And layout.GetMetrics(0) > 1000 Then ' layout width is not expressed in percentage...

      layout.Spacing(Page.GetPageWidth * 1.1, Page.GetPageHeight * 1.1)  ' set to 10% more of the page - expressed as value

    Else

      layout.Spacing(10, 10)  ' set to 10%

    End If

  End Sub

Context

Page designer