I have a button to add an entry to the bottom of the list (last entry). When I do this I want to programatically scroll the GtkScrolledWindow to the bottom (where the new row is). I’m using …
This doesn’t scroll to the bottom of the list but to the old bottom (before I added the row to the liststore).
Presumably the widgets have not had time to update to the expanded liststore. Can I trigger this before doing the scroll? How should this be handled?
Michael
Edit: I tried adding …
while (g_list_model_get_n_items (gtk_window_get_toplevels ()) > 0)
g_main_context_iteration (NULL, TRUE);
after adding the item to the list but then it didn’t scroll at all … somehow it doesn’t even get to that line 8-(
Yes, I see there seems to be some inherent scroll capability in GtkColumnView but I couldn’t get this to work. The widget just kept growing without scrolling. This is why I put it in a scrolled window (which does work as expected).
OK, then yes gtk_column_view_scroll does scroll the column view when inside a GtkScrolledWindow but it suffers from the same issue. I still need to have an idle process to do the scroll because the added item in the ListStore has not propagated through to the widget.