CheckBoxChanged

Fires when the user selects or clears a member’s check box. The event procedure’s parameters provide the member’s dimension ID and member ID, as well as a flag indicating whether the check box was selected or cleared.

Note:

This event fires only when the user selects one check box. If the user clicks the button for selecting or clearing all check boxes, the MultiCheckBoxChanged event fires.

Syntax

<HsvPOVSelection>_CheckBoxChanged(lDim As Long, lItemID As Long, lParentID As Long, bNewCheckState As Boolean)

Argument

Description

lDim

Long (ByVal). The ID of the member’s dimension. Dimension IDs are represented by the HFMConstants type library constants listed in Dimension ID Constants.

lItemID

Long (ByVal). The member ID of the member.

lParentID

Long (ByVal). The parent of the lItemID argument’s member.

For dimensions other than Entity, or for Entity members without parents, the system passes the HFMConstants type library constant MEMBERNOTUSED to this argument. For information on this constant, see Dimension Member Constants.

bNewCheckState

Boolean (ByVal). A flag that indicates whether the check box was selected or cleared. TRUE indicates selected, FALSE indicates cleared.

Example

The following event procedure prints to Visual Basic’s Immediate window the label of the member for which the check box was changed and whether the check box was selected or cleared. If the member has a parent, the parent’s label is also printed. The IHsvTreeInfo method GetLabel gets the labels from the member IDs passed to the event procedure.

Private Sub cFormPOV_CheckBoxChanged(ByVal lDim As Long, _
  ByVal lItemID As Long, ByVal lParentID As Long, _
  ByVal bNewCheckState As Boolean)
Dim cTreeInfo As IHsvTreeInfo, cMetadata As HsvMetadata
Dim sMemLabel As String, sParLabel As String
'cSession is a previously set HsvSession instance
Set cMetadata = cSession.Metadata
Set cTreeInfo = cMetadata.Dimension(lDim)
cTreeInfo.GetLabel lItemID, sMemLabel
'if the member has a parent, get the parent's label
If lParentID <> MEMBERNOTUSED Then
    cTreeInfo.GetLabel lParentID, sParLabel
    sMemLabel = sParLabel & "." & sMemLabel
End If
Debug.Print sMemLabel & "=" & bNewCheckState
End Sub