I have a listbox and I’d like to have it programmatically scroll to a given row. So far I couldn’t find a working solution.
grab_focuson the child. I have tried to set the focus vadjustment on the listbox and on the viewport. And I’ve tried to call grab_focus on the
ListBoxRowand on the child widget itself, to no avail. I saw that at least another user tried the same and failed too (link in a followup post because I don’t have the rights)
I’ve tried calling translate_coordinates between the ScrolledWindow and the ListBoxRow, and the Viewport and the ListBoxRow. And also between ScrolledWindow+ListBoxRow and the child widget itself. I got either 1 or -1 y coordinate difference every time, so not the correct value.
How can I achieve the desired effect with ListBox? Thank you!