[GTK3] [C] Function call to move cursor to a different textview widget

Hi all,

I’m creating a user interface that involves populating a new textview every time the user presses ‘return’. Is there a gtk function call I can make to automatically move the cursor to a newly created textview?

For example when I start the program, the cursor is automatically in the first textview, ready to receive keyboard input. After the user types their string and presses ‘return’, a new textview is created elsewhere in the window. I would like the cursor to also move to that new textview, ready for keyboard input.

Maybe you want Gtk.Widget.grab_focus()?

1 Like

This worked. Thank you very much!

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.