Multicolumn hierarchical listbox

Hi,

I know how to display and use an hierarchical listbox.
However the addfolder-method only excepts a string (not an array of strings).
So I can add no columns with extra information on the folder level??

Both the folder and the items in it should have data next to them in the extra columns.

As an example think of a folder of files
where the folder shows the last modification date, the total size …etc. for alle the files that it contains.
Also the additional columns must remain editable.

Can not believe how difficult such a simple things turned out to be.

any ideas???
Thnx in advance

It can definitely be done, you just need to add data to the individual cells after adding the folder.
Something like this:

MainListbox.AddFolder(item.Name) MainListbox.Cell(MainListbox.LastIndex,1) = item.ModificationDate.ShortDate MainListbox.Cell(MainListbox.LastIndex,2) = Str(item.Length)

You can store the number of the just added Row (both AddRow and AddFolder), then use that in .Cell and the Column number where you wnt to add data.

[code]Dim Loc_Row As Integer

Listbox1.AddFolder “”
Loc_Row = Mistbox1.LastFolder
Listbox1.Cell(Loc_Row,1) “Stuff for Column 1”
// And so on[/code]

The relevant entry in the LR is: ListBox.LastIndex .

You guys Rock!!!

Everything works like a charm!!
Couldn’t believe I didn’t find this myself :-/

Thank you so much :smiley:

This happens to me too, sometimes :frowning:

At best I‘m able to pebble … sigh