Skip to content

FindItem Method

Description

Finds and returns a PropertyGridItem, searching by the Caption or Tag value.

Syntax

Public Function FindItem( _
    ByVal CaptionOrId As Variant _
) As PropertyGridItem

Parameters

  • CaptionOrId: A Variant value. If it is a String, then the Caption is used to search for the item. If it is a number, then the Id is used to search for the item.

Return Type

Reference to the found PropertyGridItem.

Example

This sample illustrates how to find a PropertyGridItem in the collection of items. Once found, you can access and modify the item.

Dim Item As PropertyGridItem

' Finds the PropertyGridItem with a Caption of "Settings"
Set Item = wndPropertyGrid.FindItem("Settings")

' Finds the PropertyGridItem with an ID of 500.
Set Item = wndPropertyGrid.FindItem(500)

See Also


Copyright (c) 1998-2024 Codejock Technologies. All rights reserved.