# Remove all items from G4P Droplist

**URL:** <https://discourse.processing.org/t/remove-all-items-from-g4p-droplist/44306>\
**Category:** Libraries\
**Created:** [April 17, 2024, 6:22pm UTC](https://discourse.processing.org/t/remove-all-items-from-g4p-droplist/44306 "2024-04-17T18:22:21Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![quark](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/quark/32/26_2.png) [@quark](https://discourse.processing.org/u/quark)\
**Post date:** [April 18, 2024, 8:18am UTC](https://discourse.processing.org/t/remove-all-items-from-g4p-droplist/44306/2 "2024-04-18T08:18:25Z")

</div>

> [@Thundercat](#):
>
> Any thoughts on how to totally empty a list so I can repopulate it with new values?

The droplist control does not like to be empty. The best thing is not to empty the control but simply replace the existing items with a new set of items.

```auto
// dlst = a droplist control
// items = an array or list of Strings
// index = the index number for the selected item
dlst.setItems(items, index);

```

---

_[View the full topic](https://discourse.processing.org/t/remove-all-items-from-g4p-droplist/44306)._
