I'm rebuilding a project I had already done in Qt, but using gktmm just for fun. The projects contains several tables, which get more and more columns and rows as days pass. Eventually it starts being necessary to scroll horizontally, and I'd like my gtk::TreeView to have headers on its rows, so they are visible all the time while scrolling horizontally and vertically
This is the new project (left) vs the old project (right) As you can see the old one has headers on the rows (i forgot to put them on columns too, i know) and that's what I'd like to achieve. (As well as coloring) If i simply set up the first column and write the names there, it will go out of sight when scrolling horizontally
I don't think that this is actually implemented in gtk::TreeView
. To get that functionality you might have to override the scroll method(s) and hide/show columns instead of scrolling the view.
Gnumeric uses the GocCanvas widget from the goffice library to achieve the desired effect, but I haven't seen C++ bindings.
Well, so far the closest working solution I've found is creating a side treeview besides the original one and populate the headers into it. This will require the following
I really really hope this is somehow possible, but I've just figured this out and I'm yet to try the connections
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.