GNOME Bugzilla – Bug 118496
Gtk::ScrolledWindow doesn't scroll added object
Last modified: 2004-12-22 21:47:04 UTC
Gtk::ScrolledWindow doesn't scroll TreeView object added to it in gtkmm2 versions 2.0 and 2.1. In the example source code, src/MainWindow_ui.cpp, TreeView is added with "scrollwin_ptr->add (m_tree_view);" The documentation doesn't state any other actions required beyound calling add() to make ScrolledWindow scroll TreeView when its TreeSelection::select(path) is called to highlight next row which is invisible. The expected behaviour at this point for ScrolledWindow is to adjust TreeView so that the newly selected row is aligned in the center of the visible window. This is how it used to work with CList and ScrolledWindow in gtkmm1.2. Example source code can be found here: http://users.erols.com/volotsky/vlg/gtkmm/TreeViewTest-1.1.tar.gz. Package requires gnomemm2 to be installed. Compile and start TreeViewTest. Clicking 'Down' button repeatedly will select rows 1 through 7. On the 8th click, row 8 is selected, but ScrolledWindow does not adjust the view to make it visible. Nor does it scroll the 8th row to be centered in the middle of the window.
> Package requires gnomemm2 to be installed. No, please provide a simple-as-possible test case. I will not spend my time reducing your test case. Your time is not more valuable than mine. I do want to investigate this, but you need to bring me something to investigate.
You do not seem to be using Gtk::TreeView::scroll_to_view(), but you seem to know about this already: http://marc.theaimsgroup.com/?l=gtkmm&m=105614160928029&w=2 I will close this bug if there is no simple test case.
Please respond. Otherwise I will assume that the advice above fixes your problm, and I will close this bug.
Closing due to lack of response or test case.