Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 4027548
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T11:06:36+00:00 2026-05-20T11:06:36+00:00

I have a treeview-widget inside a ScrolledWindow , which is populated during runtime. I

  • 0

I have a treeview-widget inside a ScrolledWindow, which is populated during runtime. I want the ScrolledWindow to auto-scroll to the end of the list. I “solved” the problem, by adjusting the vadjustment of the ScrolledWindow, everytime a row is inserted into the treeview. e.g:

if new_line_in_row:
   adj = self.scrolled_window.get_vadjustment()
   adj.set_value( adj.upper - adj.page_size )

If i run the code in an interactive ipython session and set the value by myself, everything works as expected.

If i run the code with the default python interpreter, the auto-scroll doesn’t work all the time. I debugged the code and the problem seems be, that the adjustment values have some kind of “lag” and are only changed after some period of time.

My question is: how do I scroll, reliably, to maximum position of the ScrolledWindow? is a special signal generated which i can use? or is there a better way to set the adjustment-value?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-20T11:06:37+00:00Added an answer on May 20, 2026 at 11:06 am

    After widening my search-radius, i found a ruby-related answer. since the problem is gtk-related, it should be able to be solved in any language like this:

    you connect the widget which changes, in my case the treeview, with gtk.widget‘s ‘size-allocate’ signal and set the gtk.scrolledwindow value to “upper – page_size”. example:

    self.treeview.connect('size-allocate', self.treeview_changed)
    

    …

    def treeview_changed(self, widget, event, data=None):
        adj = self.scrolled_window.get_vadjustment()
        adj.set_value( adj.upper - adj.page_size )
    

    link to the original post at ruby-forum.com:

    hint hint

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a TreeView in my form for which I dont want to have
I have a treeview with nodes like this: Foo (1234), and want to allow
I have a TreeView windows forms control with an ImageList , and I want
I have a treeview in my masterpage. When a contentpage is loaded i want
I have TreeView control and I want to bind tree nodes' IsExpanded property to
I have a treeview and a button. I want to disable the button (IsEnabled=false)
I have a TreeView which has three levels. Lets say its a league, division
I have a TreeView in excel 2007 with checkboxes. I want the checkboxes to
I have treeview and 2 imagelist first image list contains images only 42x42 and
I Have a treeView Already populated (in vb.net) and would Like to move all

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.