Here is a newbie question: I would like to create a C++ graphical application on Haiku that contains a table with rows and titled columns but I don’t find any class/function (BTable, BTree) anywhere (online documentation, books I bought, community forum and internet) about this feature.
It exists because there are plenty tables in the system GUI. So please, what is the class and maybe a detailed example to create a table, add/delete/move/edit rows?
And also about a tree to expand/collapse lines, is there any class in the standard library?
In advance thank you very much for your help.
You can use BColumnListView for this, combined with its friens BColumn, BRow. It does both things: a table with multiple columns, of which lines can be organized in a tree and folded/unfolded.
I think there is no documentation for it yet, so you will have to look at the sourcecode of other applications using it.
Thank you very much for your prompt reply.
I confirm, there is no reference to this class anywhere, so it will be hard to use it without any documentation.
You’re right, I will consult some source code.
Thanks again for your help.
I´m not sure if it is the best example but you can take a look at the source code for my app Kottan, found here on GitHub: https://github.com/andimachovec/Kottan/tree/master/src
BColumnListView is used as the base class for the MessageView class.
I´ve got all the info I needed from the source code of other apps using BColumnListView (can´t remember exactly which one, maybe one of the preferences apps) and also from the source code of BColumnListView and it´s utility classes as well.
That should give you a start, feel free to ask for help if you get stuck somewhere.
A big thank to your reply and information you gave here.
Sure, I will have a look at your source code and other apps and ask for help if needed.
Now I get some great answers and tools to start with BColumnListView. I only need to search and learn how to do…
Thanks a lot for your help!