15

I'm using glade 3, to create TreeView and successfully added row as algorithm done, but I had a little issue because treeview will add new row, thus my "GUI" will getting longer to the below, how could I add the scrollbar for this TreeView? in order to make my "GUI" not getting any longer?

Note: I have added "a new adjustment" and connected it for TreeView and ScrollBar vertical as well, but still not get the job done.

any idea?

gpoo
  • 8,408
  • 3
  • 38
  • 53
capede
  • 945
  • 1
  • 13
  • 26

1 Answers1

17

Try putting your TreeView into a GtkScrolledWindow. E.g.:

<child>
  <object class="GtkScrolledWindow" id="scrolledwindow1">
    <property name="visible">True</property>
    <property name="hscrollbar_policy">automatic</property>
    <property name="vscrollbar_policy">automatic</property>
    <child>
      <object class="GtkTreeView" id="items_view">
        <property name="visible">True</property>
        <property name="can_focus">True</property>
        <property name="model">list_items</property>
      </object>
    </child>
  </object>
</child>
Joshua Taylor
  • 84,998
  • 9
  • 154
  • 353
serge_gubenko
  • 20,186
  • 2
  • 61
  • 64