ProvideChildNodes

The ProvideChildNodes method of the IOlapAddIn interface responds to a request that the add-in program populate a collection of OlapTreeNodes that belong to the OlapTreeNode that is currently selected or being expanded. Your add-in program uses this method to add nodes to the tree view.

Syntax

ProvideChildNodes(ParentNode As OlapTreeNode, _
TreeNodes As OlapTreeNodes)

Calling Arguments
ParentNode
The OlapTreeNode that is currently selected or being expanded in the tree view display.
TreeNodes
An empty collection of OlapTreeNode objects. The add-in program populates this collection with the child OlapTreeNodes that belong to the ParentNode.
Remarks

An add-in program uses this method only if it needs to add OlapTreeNodes to the tree view.

Example

'Declarations

Private Enum SampleIcons 'Icons for tree nodes

  icoForm1 = 1

  icoForm2

End Enum

'Other code

Private Sub IOlapAddIn_ProvideChildNodes( _

    ParentNode As DSSAddInsManager.IOlapTreeNode, _

    TreeNodes As DSSAddInsManager.OlapTreeNodes)

  On Error GoTo pc_Err 'Handle errors

  If ParentNode.Caption = "OLAP servers" Then

    TreeNodes.Add "Sample Form1", icoForm1

  Else

    TreeNodes.Add "Sample Form2", icoForm2

  End If

  Exit Sub

pc_Err:

  MsgBox "ProvideChildNodes Failed"

  Err.Clear

End Sub

 

(c) 1988-1998 Microsoft Corporation. All Rights Reserved.