Hi,
I have an application with a GtkListBox
and I would like to add a new child and focus to it such that the view also scrolls to the focused child. Just calling grab_focus()
on the child directly after adding it will reset the scroll position to the top which is highly annoying. From here I found out that this is due to the ListBoxRow
not being realized yet and indeed calling grab_focus()
after a small timeout works, but I’m wondering if there is a more “correct” solution.
I’ve already tried calling grab_focus()
when the GtkListBoxRow
or the child emit realize
, but that doesn’t fix the bug with the scrolling.
Cheers!