onBeginLayout   Go to object model Go to parent topic Go to previous topic Go to next topic

Syntax

onBeginLayout pgSetup, printInfo

Description

This event is fired right before the Autodesk MapGuide Viewer uses the internal algorithm to lay out the page elements.

This topic describes this event for ActiveX Control. For Plug-In and Java Edition, see MGPrintingObserver.onBeginLayout.

Example

To handle this event from the Autodesk MapGuide ActiveX Control, define the following VBScript and JavaScript functions:

<!--
The VBScript function handles the event from the ActiveX Control 
Control and then passes it to the JavaScript function.
-->
<SCRIPT LANGUAGE="VBScript">
Sub ObjectId_onBeginLayout (pgSetup, printInfo)
onBeginLayout pgSetup, printInfo
End Sub
</SCRIPT>

<SCRIPT LANGUAGE="JAVASCRIPT">
function onBeginLayout (pgSetup, printInfo)
{
... Event Handling Code Here ...
}
</SCRIPT>

In the example above, ObjectId is the ID of the embedded map specified as part of the HTML OBJECT tag. Refer to "Displaying Maps" chapter in the Autodesk MapGuide Developer's Guide for details on how to embed the ActiveX Control using the OBJECT tag.

Applies To

ActiveX Control only

Parameters

pgSetup - An MGPageSetup object representing the current page layout settings.

info - An MGPrintInfo object containing information about the current printing operation.

Error Codes

none

See Also

onEndLayout, enablePrintingEvents, disablePrintingEvents, getPrintingObserver, setPrintingObserver