Tree view order nodes before leaves


I want to use a tree view as a navigation system, and my windows are arranged for some in sub folders and for others directly on the root node
The issue is that, even though the Auto Sort is Flase, the nodes (folders) are always shown above the leaves

I can change the display order of the folders or of the leaves, but I cannot move a leaf above a folder.


Code of the create menu function, (custom method of the tree view):

	headers = ["path","text","icon","background","foreground","tooltip","border","selectedText","selectedIcon","selectedBackground","selectedForeground","selectedTooltip","selectedBorder"]

	rows = []
	home = [u"", u"Accueil", "Builtin/icons/16/home.png", "color(255,255,255,255)", "color(46,46,46,255)", u"Page d'accueil", "", "", "Builtin/icons/16/home.png", "color(71,169,230,255)", "color(255,255,255,255)", "", ""]

	administration = [u"", u"Administration", "Builtin/icons/16/lock.png", "color(255,255,255,255)", "color(46,46,46,255)", u"Administration", "", "", "Builtin/icons/16/lock_open.png", "color(71,169,230,255)", "color(255,255,255,255)", "", ""]

	astreinte = [u"Administration", u"Astreinte", "Builtin/icons/16/businessmen.png", "color(255,255,255,255)", "color(46,46,46,255)", u"Gestion des groupes d'astreinte" , "", "", "Builtin/icons/16/businessmen.png", "color(71,169,230,255)", "color(255,255,255,255)", "", ""]
	gestionPostes = [u"Administration", u"Postes", "Builtin/icons/16/workstation1.png", "color(255,255,255,255)", "color(46,46,46,255)", u"Gestion des postes", "", "", "Builtin/icons/16/workstation1.png", "color(71,169,230,255)", "color(255,255,255,255)", "", ""]
	gestionSignaux = [u"Administration", u"Signaux", "Builtin/icons/16/oszillograph.png", "color(255,255,255,255)", "color(46,46,46,255)", u"Gestion des signaux", "", "", "Builtin/icons/16/oszillograph.png", "color(71,169,230,255)", "color(255,255,255,255)", "", ""]

[...] = system.dataset.toDataSet(headers, rows)

1 Like

plz let me know if solved this issue

I was able to achieve roughly the same by using two separate controls. The top one lists the nodes without children/folders. The bottom one lists folders. I suppose it's possible adjust the controls height in some way depending on the number of nodes it has to display.
Hope it helps!