event IncludeProperty (Property as Property, Cancel as Boolean)

Fired when the properties browser is about to include a new property.

TypeDescription
Property as Property A Property object that contains information about the item that is going to be included.
Cancel as Boolean A boolean expression that indicates whether the property is excluded or included.

Use the IncludeProperty event to filter the object properties. The event is fired only if the FireIncludeProperty property is True. Use the Cancel argument of the event to include or exclude a property. Use Cancel = True to exclude a property from the list. Use the HTMLName property to display HTML format in the Name column.

Syntax for IncludeProperty event, /NET version, on:

private void IncludeProperty(object sender,exontrol.EXPROPERTIESLISTLib.Property Property,ref bool Cancel)
{
}

Private Sub IncludeProperty(ByVal sender As System.Object,ByVal Property As exontrol.EXPROPERTIESLISTLib.Property,ByRef Cancel As Boolean) Handles IncludeProperty
End Sub

Syntax for IncludeProperty event, /COM version, on:

private void IncludeProperty(object sender, AxEXPROPERTIESLISTLib._IPropertiesListEvents_IncludePropertyEvent e)
{
}

void OnIncludeProperty(LPDISPATCH Property,BOOL FAR* Cancel)
{
}

void __fastcall IncludeProperty(TObject *Sender,Expropertieslistlib_tlb::IProperty *Property,VARIANT_BOOL * Cancel)
{
}

procedure IncludeProperty(ASender: TObject; Property : IProperty;var Cancel : WordBool);
begin
end;

procedure IncludeProperty(sender: System.Object; e: AxEXPROPERTIESLISTLib._IPropertiesListEvents_IncludePropertyEvent);
begin
end;

begin event IncludeProperty(oleobject Property,boolean Cancel)
end event IncludeProperty

Private Sub IncludeProperty(ByVal sender As System.Object, ByVal e As AxEXPROPERTIESLISTLib._IPropertiesListEvents_IncludePropertyEvent) Handles IncludeProperty
End Sub

Private Sub IncludeProperty(ByVal Property As EXPROPERTIESLISTLibCtl.IProperty,Cancel As Boolean)
End Sub

Private Sub IncludeProperty(ByVal Property As Object,Cancel As Boolean)
End Sub

LPARAMETERS Property,Cancel

PROCEDURE OnIncludeProperty(oPropertiesList,Property,Cancel)
RETURN

Syntax for IncludeProperty event, /COM version (others), on:

<SCRIPT EVENT="IncludeProperty(Property,Cancel)" LANGUAGE="JScript">
</SCRIPT>

<SCRIPT LANGUAGE="VBScript">
Function IncludeProperty(Property,Cancel)
End Function
</SCRIPT>

Procedure OnComIncludeProperty Variant llProperty Boolean llCancel
	Forward Send OnComIncludeProperty llProperty llCancel
End_Procedure

METHOD OCX_IncludeProperty(Property,Cancel) CLASS MainDialog
RETURN NIL

void onEvent_IncludeProperty(COM _Property,COMVariant /*bool*/ _Cancel)
{
}

function IncludeProperty as v (Property as OLE::Exontrol.PropertiesList.1::IProperty,Cancel as L)
end function

function nativeObject_IncludeProperty(Property,Cancel)
return

For instance, if the control's ShowVariables is True, the control includes also the variables for an IPictureDisp object ( hPal variable ).

The following sample shows how to exclude variables of IPictureDisp ( picture) properties:

Private Sub PropertiesList1_IncludeProperty(ByVal Property As EXPROPERTIESLISTLibCtl.IProperty, Cancel As Boolean)
    If Not (Property.Object Is Nothing) Then
        Cancel = Property.Variable And TypeOf Property.Object Is IPictureDisp
    End If
End Sub

The following sample includes only the properties of IFontDisp type, and their variables:

Private Sub PropertiesList1_IncludeProperty(ByVal Property As EXPROPERTIESLISTLibCtl.IProperty, Cancel As Boolean)
    Cancel = Not Property.Type = "Font*"
    If (Cancel) Then
        If Not (Property.Object Is Nothing) Then
            Cancel = Not Property.Variable
        End If
    End If
End Sub

The following sample include only the properties of boolean type, and properties of Object type:

Private Sub PropertiesList1_IncludeProperty(ByVal Property As EXPROPERTIESLISTLibCtl.IProperty, Cancel As Boolean)
    Cancel = Not Property.Type = "BOOL"
    If (Cancel) Then
        Cancel = Not Property.PropertyObject
    End If
End Sub

The following sample includes all properties contained by "Misc" category:

Private Sub PropertiesList1_IncludeProperty(ByVal Property As EXPROPERTIESLISTLibCtl.IProperty, Cancel As Boolean)
    Cancel = Not (Property.CategoryName = "Misc")
End Sub

The following sample shows how to simulate the VB browser ( the ShowObjects property is True ):

Private Sub PropertiesList1_IncludeProperty(ByVal Property As EXPROPERTIESLISTLibCtl.IProperty, Cancel As Boolean)
    Cancel = Property.PropertyObject
    If (Cancel) Then
        Cancel = Not (Property.Type = "Font*" Or Property.Type = "Picture*")
    End If
End Sub

The following sample shows how to include into your browser only the property pages:

Private Sub PropertiesList1_IncludeProperty(ByVal Property As EXPROPERTIESLISTLibCtl.IProperty, Cancel As Boolean)
    Cancel = Not Property.PropertyPage
End Sub

Here's a sample that shows how to include only hidden members:

Private Sub PropertiesList1_IncludeProperty(ByVal Property As EXPROPERTIESLISTLibCtl.IProperty, Cancel As Boolean)
    Cancel = Not (Property.Flags And &H40) = &H40
End Sub

The following sample excludes the "hPal" variable of a Picture property:

Private Sub PropertiesList1_IncludeProperty(ByVal Property As EXPROPERTIESLISTLibCtl.IProperty, Cancel As Boolean)
    If Property.Variable = True Then
        If Property.Name = "hPal" Then
            Cancel = True
        End If
    End If
End Sub