ISRegion.Children

Description

The children regions of the specified region.

Syntax

object.Children

Part Attribute Type Description
object Required
The object always implements the ISRegion interface
Restriction: This property is readonly.

Return Value

ISCollection

Example

Display the tree of the specified region.

sub main
  Dim aPostCode
  Dim aRegions, aRegion
  Dim aMessage

  Set aPostCode = Profile.LookupPostCode("", "Mara", "CAN", "BC")
  if aPostCode is nothing then
    exit sub
  end if
  
  set aRegions = aPostCode.Regions
  
  for each aRegion in aRegions
    aMessage = aMessage & vbNewLine & GetRegionInfo(aRegion, 0) 
  next 
 
  Profile.MsgBox(aMessage)  
end sub

function GetRegionInfo(aRegion, aLevel)
  Dim aInfo
  Dim aChildRegion
  Dim aRegionChildren
  
  set aRegionChildren = aRegion.Children
  aInfo = Space(4 * aLevel) & aLevel & " - " & aRegion.Name &_
    " (" & aRegionChildren.Count & ")"
  
  for each aChildRegion in aRegionChildren
    aInfo = aInfo & vbNewLine & GetRegionInfo(aChildRegion, aLevel + 1)
  next 

  GetRegionInfo = aInfo  
end function  
Note:

In Profile Client v8 on User Interface Children can be found in Maintain > Post Codes > Regions.

Version information

Added in v7.8.0