What you need to do is set the hexpand and vexpand in GtkScrolledWindow to True . You can do this when creating the object as follows:
scroll = Gtk.ScrolledWindow(hexpand=True, vexpand=True)
If you agree with this, I recommend that you use Glade to work with your program interface, it greatly simplifies the work of such problems, since you have easy access to all widgets.
source share