Xojo Treeview custom opened/closed icons

Good morning

Stumbled upon this Xojo add-on for displaying hierarchical tree view:

Someone using this add-on? And if so…is there a possibility to change those Open/Close Icons through own images?

Should look in the end like those FPGA IDEs from Altera/Xilinx/Lattice:

You should take a look at the docs. It’s possible with DesktopListbox.

PaintDisclosureWidget

Wow…that is easy :slight_smile:

If ListBox1.RowExpandedAt(row) Then
  g.DrawPicture(folderopen, 0, 0)
Else
  g.DrawPicture(addfolder, 0, 0)
End If


Going this way probably doesn’t take longer as using an add-on. And I learn much more then :wink:

1 Like

Hmm…just for understanding…DesktopListBox doesn’t know actually about hierarchy?
AddExpandableRow is just for drawing the collapse/expand icon and causes the text to indent.

So if I want a deeper hierarchy, I would have to draw an icon with white space at left, right?

Check out the video here to understand how hierarchical Listboxes work in Xojo.

And you can get a deeper insight here.

1 Like