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?
For vertical scrollable bar use the x and y axis. Set the overflow-x:hidden; and overflow-y:auto; that will automatically hide the horizontal scroll bar and present only vertical scrollbar. Here the scroll div will be vertically scrollable.
To do this you will first need to set a fixed height (for vertical scrolling) or fixed width (for horizontal scrolling) on the container. Then you can use overflow-x and overflow-y to tell the browser how to handle content that extends outside of that width/height.
You need to add style="overflow-y:scroll;" to the div tag. (This will force a scrollbar on the vertical).
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>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With