<div class="meta" robots="noindex">

</div>

# ListBox.InsertFolder

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

<div class="warning">

<div class="title">

Warning

</div>

This item was deprecated in version 2019r2. Please use `DesktopListBox.AddExpandableRowAt<desktoplistbox.addexpandablerowat>` as a replacement.

</div>

## Description

Creates a new folder at *row* (zero-based), moving the existing rows down. The *text* is always assigned to column zero. The optional parameter *indent* specifies the amount of indentation of the folder in hierarchical ListBoxes. The default is zero. It has no effect on non-hierarchical ListBoxes.

## Sample code

The following example in a `PushButton</api/deprecated/pushbutton>` adds a row to the hierarchical ListBox that is used for the example in `AddExpandableRow<listbox.addexpandablerow>`. It adds a new state to the hierarchical list of cities and states.

``` xojo
Listbox1.InsertFolder(1, "New Hampshire")
```

## Compatibility

All projects types on all supported operating systems.

## See also

`ListBox</api/deprecated/listbox>` parent class
