# Listbox AddRow versus AddFolder and fillnig multiple cells

**URL:** <https://forum.xojo.com/t/listbox-addrow-versus-addfolder-and-fillnig-multiple-cells/40976>\
**Category:** General\
**Created:** [December 4, 2017, 6:59am UTC](https://forum.xojo.com/t/listbox-addrow-versus-addfolder-and-fillnig-multiple-cells/40976 "2017-12-04T06:59:52Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![Tim\_Jones](https://forum.xojo.com/user_avatar/forum.xojo.com/tim_jones/32/8627_2.png) [@Tim\_Jones](https://forum.xojo.com/u/Tim_Jones)\
**Post date:** [December 4, 2017, 6:59am UTC](https://forum.xojo.com/t/listbox-addrow-versus-addfolder-and-fillnig-multiple-cells/40976/1 "2017-12-04T06:59:52Z")

</div>

Is it correct functionality that this works:

```auto
ListBox.AddRow Split(textLine(x), "|")
```

but the same logic using AddFolder:

```auto
ListBox.AddFolder Split(textLine(x), "|")
```

fails with a “Parameter “Text” expects type String, but this is type String()” error?

I’m converting a Listbox to better define a log file’s content by collapsing sub-lines under the primary event line.

---

<div class="post-metadata">

**Author:** ![Wayne\_Golding](https://forum.xojo.com/user_avatar/forum.xojo.com/wayne_golding/32/165_2.png) [@Wayne\_Golding](https://forum.xojo.com/u/Wayne_Golding)\
**Post date:** [December 4, 2017, 8:09am UTC](https://forum.xojo.com/t/listbox-addrow-versus-addfolder-and-fillnig-multiple-cells/40976/2 "2017-12-04T08:09:22Z")

</div>

Entirely expected.

If you review Listbox.AddRow [http://documentation.xojo.com/index.php/ListBox.AddRow](http://documentation.xojo.com/index.php/ListBox.AddRow) you’ll see the method accepts a paramarray while ListBox.AddFolder [http://documentation.xojo.com/index.php/ListBox.AddFolder](http://documentation.xojo.com/index.php/ListBox.AddFolder) does not.

While this is a little annoying, it is within scope where a folder will normally only have a title i.e. a single cell.

You can overcome this by adding a folder with a single cell then populating the remaining cells as required.

---

<div class="post-metadata">

**Author:** ![Emile\_Schwarz](https://forum.xojo.com/letter_avatar_proxy/v4/letter/e/90ced4/32.png) [@Emile\_Schwarz](https://forum.xojo.com/u/Emile_Schwarz)\
**Post date:** [December 4, 2017, 8:23am UTC](https://forum.xojo.com/t/listbox-addrow-versus-addfolder-and-fillnig-multiple-cells/40976/3 "2017-12-04T08:23:56Z")

</div>

I had some hard times understanding Listbox AddRow multi-parameters and always used it to create the row, then get the newly added Row # in a variable (I usualy name it `LocRow`), then populate it, cell by cell.

Then one day I saw the light (using Split I think).

BTW: you used that example, and the example [in AddFolder](http://documentation.xojo.com/index.php/ListBox.AddFolder) .

---

<div class="post-metadata">

**Author:** ![Tim\_Jones](https://forum.xojo.com/user_avatar/forum.xojo.com/tim_jones/32/8627_2.png) [@Tim\_Jones](https://forum.xojo.com/u/Tim_Jones)\
**Post date:** [December 4, 2017, 8:31am UTC](https://forum.xojo.com/t/listbox-addrow-versus-addfolder-and-fillnig-multiple-cells/40976/4 "2017-12-04T08:31:21Z")

</div>

Thanks, Wayne, that’s what I discovered. As you say, a little annoying for what I do - I’m cheating and using a ListBox as a text display mechanism and (in this case) the Folder would be the parent of a multi-line log event and the expanded rows would be the child lines for that event.

Emile - that’s exactly how I discovered it a while back - I had modified a TextArea to be a ListBox and was splitting the line for the TextArea. I ran it without changing the Split - et voila - my cells were automatically filled :).

I’m trying to remove “spooky stuff” from the users’ view unless they are specifically looking for it.

---

<div class="post-metadata">

**Author:** ![Emile\_Schwarz](https://forum.xojo.com/letter_avatar_proxy/v4/letter/e/90ced4/32.png) [@Emile\_Schwarz](https://forum.xojo.com/u/Emile_Schwarz)\
**Post date:** [December 4, 2017, 8:33am UTC](https://forum.xojo.com/t/listbox-addrow-versus-addfolder-and-fillnig-multiple-cells/40976/5 "2017-12-04T08:33:14Z")

</div>

My question:  
With AddFolder one can only add text in Column(0) ?

---

<div class="post-metadata">

**Author:** ![Tim\_Jones](https://forum.xojo.com/user_avatar/forum.xojo.com/tim_jones/32/8627_2.png) [@Tim\_Jones](https://forum.xojo.com/u/Tim_Jones)\
**Post date:** [December 4, 2017, 8:36am UTC](https://forum.xojo.com/t/listbox-addrow-versus-addfolder-and-fillnig-multiple-cells/40976/6 "2017-12-04T08:36:27Z")

</div>

You CAN add text in all columns, but not via the paramarray mechanism as with AddRow. You have to populate each cell on the Folder row manually. I’m working on a feature request to change that.

---

<div class="post-metadata">

**Author:** ![Emile\_Schwarz](https://forum.xojo.com/letter_avatar_proxy/v4/letter/e/90ced4/32.png) [@Emile\_Schwarz](https://forum.xojo.com/u/Emile_Schwarz)\
**Post date:** [December 4, 2017, 10:02am UTC](https://forum.xojo.com/t/listbox-addrow-versus-addfolder-and-fillnig-multiple-cells/40976/7 "2017-12-04T10:02:59Z")

</div>

Thanks.

---

<div class="post-metadata">

**Author:** ![system](https://forum.xojo.com/uploads/default/original/1X/455b4dcc0e61630e9f81940004ddffa49c432a46.png) [@system](https://forum.xojo.com/u/system)\
**Post date:** [October 29, 2020, 7:00pm UTC](https://forum.xojo.com/t/listbox-addrow-versus-addfolder-and-fillnig-multiple-cells/40976/8 "2020-10-29T19:00:55Z")

</div>


