Previous Topic

Next Topic

Inhoudsopgave

Book Index

Loading Property

Property Property Loading: Boolean (R/W)

Description

The Script Engine uses the Delphi Load mechanism for managing ownership of forms and their (visual) components.

By using this mechanism (visual) components are released from memory in the correct order when the form is destroyed.

Set the property to true right after instantiating an Edit Form object.

Set the property to false after initializing all form components.

Code Snippet

Dim frmEditForm

Sub Main

Call frmEditForm_InitializeComponents()

frmEditForm.ShowModal

Set frmEditForm = nothing

End Sub

Sub frmEditForm_InitializeComponents()

Set frmEditForm = IsahObjects.Get("EditFormObject")

frmEditForm.Loading = true

Rem ... more code here ...

frmEditForm.InitializeGridFields = "InitializeGridFields"

Rem The InitializeGridFields event handler contains code to change the look and behaviour of

Rem the Grid fields

frmEditForm.OnShow = "InitializeComponents"

Rem The InitializeComponents event handler contains code to add visual components

Rem to the Edit form

frmEditForm.Loading = false

End Sub