# InspectorSection
Class
## About
`InspectorSection` is an ordered, collapsible group of related `InspectorItem` objects. Its identifier should be stable and its caption should describe the user-facing concept rather than the implementation class.
## Methods
| Name | Parameters | Return Type | Description |
| --- | :---: | :---: | --- |
| Add | item As InspectorItem | (None) | Adds an item to the end of this section. |
| AddAt | index As Integer <br> item As InspectorItem | (None) | Inserts an item at the specified zero-based index. |
| Constructor | identifier As String <br> caption As String | (None) | Creates an inspector section initialized with the supplied values. |
| IndexOf | item As InspectorItem | Integer | Returns the index of the supplied item, or -1 when absent. |
| ItemAt | index As Integer | InspectorItem | Returns the item at the specified zero-based index. |
| LastIndex | (None) | Integer | Returns the last zero-based item index, or -1 when there are no items. |
| RemoveAll | (None) | (None) | Removes all items. |
| RemoveAt | index As Integer | (None) | Removes the item at the specified zero-based index. |
## Properties
| Name | Type | Default Value | Description |
| --- | :---: | :---: | --- |
| Caption | String | (None) | Gets or sets the user-visible section caption. |
| Expanded | Boolean | True | Gets or sets whether this section is expanded. |
| Identifier | String | (None) | Gets or sets the stable section identifier. |
## Notes
A section should model one user-facing concept. The inspector omits sections that contain no available items for the current target.
### Organization
Use concise groups such as Content, Typography, Appearance, Field, Accessibility, or Background Image. Put properties where users expect to find them and avoid sections containing only internal behavior switches.
## Examples
Nodes return freshly constructed metadata from `InspectorSections`.
### Custom Content Section
```xojo
Function InspectorSections() As GraffitiProEditor.InspectorSection()
Var result() As GraffitiProEditor.InspectorSection
Var content As New GraffitiProEditor.InspectorSection("content", "Content")
Var title As New GraffitiProEditor.InspectorItem("title", "Title", "Title", GraffitiProEditor.InspectorItem.Editors.Text)
title.Description = "Text displayed by this node."
content.Add(title)
result.Add(content)
Return result
End Function
```