IObjectViewItem.Expanded [Property][Get/Set]
- Last UpdatedJul 18, 2023
- 1 minute read
Gets or Sets the expanded state of an item in the ObjectView. This change is reflected immediately in the visualization of the ObjectView.
Defined As
-
[VBA] Boolean Expanded
-
[Cicode] INT Expanded
-
[C++] VARIANT_BOOL Expanded
Execution Result
If the property get succeeds, the return value will be Success. If the return variable is bad, the return value will be InvalidArgument.
Limits
-
True (-1): Expanded
-
False (0): Collapsed
Calling Syntax
This example assumes there is a valid Item as retrieved from an Items Collection from an ObjectView. (for example, VBA: objectView.Items.Item(1)).
[VBA]
Sub Example(objectViewItem As Object)
Dim expanded As Boolean
`Getting Property value
expanded = objectViewItem.Expanded
`Setting Property value
objectViewItem.Expanded = False
End Sub
[Cicode]
FUNCTION Example(OBJECT hObjectViewItem)
// Getting property value
INT nExpanded = _ObjectGetProperty(hObjectViewItem, "Expanded");
// Setting Property
_ObjectSetProperty(hObjectViewItem, "Expanded", 0);
END