Listbox AddRow versus AddFolder and fillnig multiple cells

Is it correct functionality that this works:

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

but the same logic using AddFolder:

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.

Entirely expected.

If you review 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 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.

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 .

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.

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

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.

Thanks.