How to match set horizontal size of treeview to size of scrolledwindow widget?

I want to have tree view with only vertical scrollbar.
I added scrolled window and inside it a treeview, but when text is too large, then horizontal scrollbar appears and some columns are not visible.
I want to implement something like Clementine have(many columns no horizontall scroll)

For now I have this(horizontal scroll is hidden and also Modification date column is not visible)

Hi! :slight_smile:

I don’t know if you’re using GTK4 or GTK3 but if you want that you need to set the hscrollbar-policy to never (so with GTK_POLICY_NEVER). The description of the never policy looks like what you want, The scrollbar should never appear. In this mode the content determines the size.

There’s probably some other settings you’ll need to set on the tree view to avoid having it expand that much in width, but I don’t know much the tree view so I can’t say what.

Hope that helps you :slight_smile:

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.