# Adding & removing items from a list box

**URL:** <https://forum.kirupa.com/t/adding-removing-items-from-a-list-box/6351>\
**Category:** flash\
**Created:** [October 4, 2002, 10:48pm UTC](https://forum.kirupa.com/t/adding-removing-items-from-a-list-box/6351 "2002-10-04T22:48:40Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![babbaladoobala](https://avatars.discourse-cdn.com/v4/letter/b/e47c2d/32.png) [@babbaladoobala](https://forum.kirupa.com/u/babbaladoobala)\
**Post date:** [October 4, 2002, 10:48pm UTC](https://forum.kirupa.com/t/adding-removing-items-from-a-list-box/6351/1 "2002-10-04T22:48:40Z")

</div>

Hi - I am attempting to add and/or remove the selected item in a list box with a remove button. Does anyone know how to target the selected item and remove it?

I am going off of the tutorial from [Kirupa.com](http://Kirupa.com) - advanced Flash MX tutorials - create a list box.

If someone can help, that would be awesome.

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [October 6, 2002, 7:09am UTC](https://forum.kirupa.com/t/adding-removing-items-from-a-list-box/6351/2 "2002-10-06T07:09:53Z")

</div>

It’s written in the AS dictionary:

```auto
FListBox.removeItemAt (index)

```

pom 🙂

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [October 6, 2002, 11:21pm UTC](https://forum.kirupa.com/t/adding-removing-items-from-a-list-box/6351/3 "2002-10-06T23:21:14Z")

</div>

I appreciate that - thank you. If you wouldn’t mind checking out this one last question, that would be very cool:

list.removeItemAt (index) \<-- how can I set this parameter so that it only deletes the item selected? I understand that I can place an integer (say 4) there, but then it only deletes whatever is in place 4. What if the 3rd place were highlighted? Is there a way that (without changing the button for each place) I can modify this script so that the paramter slot will understand that it is supposed to delete place 3?

I really appreciate you reading this whole thing - thank you once again.

Sam:smirk:
