I have a Gtk::TextView in my program, and I’m trying to make the cursor
in the textview move to line 30, then scroll the textview so the cursor
is visible on the screen. Sounds simple?
The method to move the cursor and scroll the textview works perfectly.
The problem is that I can’t get it to run at startup time.
When I try to move the cursor before gtk.main is called, it sets the
cursor to the proper position, but the screen doesn’t scroll to show the
The scrolling of the textview is animated so it must be done in the gtk
main loop. That means it must be called AFTER gtk.main. But this
move_cursor(3) #never gets here
Gtk.main is blocking.
So once gtk.main is called I need to execute this code one at startup
when everything is shown in the window, so it can animate. is there an
event that happens once that signals the start of the loop?
is there an event called start_of_processing_events?
This issue is a lot harder than it looks.