title: How to make the last gtk.TreeViewColumn resizeable?
body: <p>One can use <code>gtk.TreeViewColumn.set_resizable(True)</code> to make column manually resizeable... except the last column -- it always occupies the available space. </p>
  
  <p>While it's sensible in most cases, I use TreeView-in-a-ScrolledView, and I'd like to be able to shrink/expand the last column too.</p>
  
  <p>Currently I use the following kludge:</p>
  
  <pre><code>def add_dummy_column(treeview):
  
      def put_dummy_last(treeview, dummy):
          columns = treeview.get_columns()
          last = next(reversed(columns), None)
          if not last or last == dummy:
              return
          if dummy in columns:
              treeview.move_column_after(dummy, last)
          else:
              treeview.append_column(dummy)
  
      dummy = gtk.TreeViewColumn()
      dummy.set_min_width(1)
      dummy.set_fixed_width(1)
      dummy.set_sizing(gtk.TREE_VIEW_COLUMN_FIXED)
      dummy.set_resizable(False)
      dummy.set_expand(False)
      treeview.connect('columns-changed', put_dummy_last, dummy)
      return dummy
  </code></pre>
  
  <p>However, this dummy column tends to always get in the way: complicates the TreeView column loops etc. Is there better/more elegant solution?</p>
  
  <p><strong>Update: it actually works</strong></p>
  
  <p>While trying to forge a minimal example, I discovered that it works fine without my kludge. Here is minimal example without gtk.ScrolledWindow:</p>
  
  <pre><code>import gtk
  
  window = gtk.Window()
  window.connect('destroy', lambda *args: gtk.main_quit())
  
  vbox = gtk.VBox()
  window.add(vbox)
  
  table = gtk.TreeView(gtk.ListStore(str, str, str))
  
  for i in range(3):
      column = gtk.TreeViewColumn('Column {}'.format(1 + i))
      column.set_resizable(True)
      column.set_sizing(gtk.TREE_VIEW_COLUMN_FIXED)
      column.set_min_width(20)
      column.set_fixed_width(80)
      column.set_expand(False)
      table.append_column(column)
  
  vbox.pack_start(table)
  
  vbox.pack_start(gtk.Statusbar(), False)
  
  window.set_default_size(300, 300)
  window.show_all()
  gtk.main()
  </code></pre>
  
  <p>Try to shrink the last column -- it's impossible. However, if you change</p>
  
  <pre><code>vbox.pack_start(table)
  </code></pre>
  
  <p>to</p>
  
  <pre><code>container = gtk.ScrolledWindow()
  vbox.pack_start(container)
  container.add(table)
  </code></pre>
  
  <p>you can expand and shrink the last column with no problems.</p>