UNO tree control with multiple columns

Creating a macro - Writing a Script - Using the API (OpenOffice Basic, Python, BeanShell, JavaScript)
Post Reply
RoflanEbalie
Posts: 1
Joined: Thu Dec 23, 2021 1:32 pm

UNO tree control with multiple columns

Post by RoflanEbalie »

I am developing a Python plugin for libreoffice using UNO. In it I want to display a hierarchical data structure.

There is tree control element in :: com :: sun :: star :: awt :: tree. It displays a hierarchical data structure. But it has only one displayable column.

Is there a way to add some more columns? If its not, is it possible to create your own control with this feature using UNO?
Libreoffice 7.2.0 on Windows 10
User avatar
RoryOF
Moderator
Posts: 34586
Joined: Sat Jan 31, 2009 9:30 pm
Location: Ireland

Re: UNO tree control with columns

Post by RoryOF »

There are some code examples at

https://wiki.openoffice.org/wiki/Treecontrol

which may be helpful.
Apache OpenOffice 4.1.15 on Xubuntu 22.04.4 LTS
JeJe
Volunteer
Posts: 2763
Joined: Wed Mar 09, 2016 2:40 pm

Re: UNO tree control with columns

Post by JeJe »

You could create your own control with image controls for the icons and label controls for the text and your own data structure behind it... a tree control is just an arrangement of those... as are other controls.
Windows 10, Openoffice 4.1.11, LibreOffice 7.4.0.3 (x64)
Post Reply