Did I find the right examples for you? yes no

All Samples(2)  |  Call(2)  |  Derive(0)  |  Import(0)
Take a treeview (presumably from a sqlmask) and, for each column asking
a fixed size, reset space request criterion to content only (not database
lenght introspection).
Then, if "resize" is True, resize window accordingly.

        def zoom_to_fit(treeview, resize=True):
    """Take a treeview (presumably from a sqlmask) and, for each column asking
    a fixed size, reset space request criterion to content only (not database
    lenght introspection).
    Then, if "resize" is True, resize window accordingly.
    """
    columns = treeview.get_columns()
    for column in columns:
        renderers = column.get_cell_renderers()
        for renderer in renderers:
            if hasattr(renderer, 'fixed_width') and renderer.fixed_width:
                # Let's fall back to the usual size method...
                renderer.fixed_width = False
        column.set_expand(True)
        column.set_min_width(0)

    if resize:
        set_optimal_width(treeview)
        
    treeview.columns_autosize()
        


src/s/q/sqlkit-0.9.6/sqlkit/widgets/table/table.py   sqlkit(Download)
    def on_zoom_fit(self, widget, *args):
 
        tv_utils.zoom_to_fit(self.treeview, resize=True)
 
#### event handling 

src/s/q/sqlkit-0.9.6/sqlkit/widgets/table/columns.py   sqlkit(Download)
    def on_zoom_fit(self, widget=None, *args):
 
        tv_utils.zoom_to_fit(self.treeview, resize=True)
 
    def fix_expandable_columns(self):