

MMenuItems.Append new MyMenuItem ( "Open", 1, AddressOf openSelectedItems)
#Xojo hierarchical listbox update
Next me.Reload ' this forces the listbox to update (by calling Events such as childOfItem etc.) // Let's save and re-open the expanded folder on restart of this app (needs to happen after loading the data, so that the list root has been loaded already) me.tosaveName = "Open Folders" me.tosaveExpandedItems = true // And we allow dragging of out items as well me.View.registerForDraggedTypes Array (NSPasteboardMBS.NSFilenamesPboardType, "public.file-url") Let's add all currently available volumes for i as Integer = 0 to VolumeCount- 1

Set up our hierarchical data, which is a tree structure me.toresizesOutlineColumn = false // And if the window is resized, we want only the first column to resize me.lumnAutoresizingStyle = NSTableViewMBS.NSTableViewFirstColumnOnlyAutoresizingStyle the vertical grid lines do not move nicely, then), or the gridlines should be not used. Me.View.outlineTableColumn = cols( 0) ' use the first column // If we want to allow column resizing, this option should be set to avoid ugly visual effect while resizing // (i.e. If we don't set this, we effectively get a flat list instead dim cols() as NSTableColumnMBS = me.View.tableColumns() Specify the column that contains the "expand" icons. Set some options to make the list "prettier" me.esAlternatingRowBackgroundColors = true me.idStyleMask = NSTableViewMBS.NSTableViewSolidHorizontalGridLineMask+NSTableViewMBS.NSTableViewSolidVerticalGridLineMask

Add two columns to the listbox dim col as new NSTableColumnMBS( "name")
