# CanBeParent(TreeViewItem<TIdentifier>)

> Override this method to control which items are allowed to be parents.

## Definition

* **Type:** Method
* **Namespace:** [UnityEditor.IMGUI.Controls](/engine/6000.7/script-reference/unityeditor/imgui/controls.md)
* **Assembly:** UnityEditor.CoreModule

## CanBeParent(TreeViewItem\<T>)

```csharp
protected virtual bool CanBeParent(TreeViewItem<TIdentifier> item)
```

### Parameters

**** (\[TreeViewItem\<T>]\(/engine/6000.7/script-reference/unityeditor/imgui/controls/treeviewitem)): Can this item be a parent?

### Returns

| Type                                                          | Description |
| ------------------------------------------------------------- | ----------- |
| [bool](https://learn.microsoft.com/dotnet/api/system.boolean) |             |

### Remarks

This is called internally by the TreeView to determine dragging behavior. For list views this function should just return false to prevent any reparenting. Default behavior: returns true.
