Gtk.Overlay do not allowed the scroll of Gtk.TextView

   overlay = Gtk.Overlay ()
    action_box = Gtk.Box (spacing=3,orientation=Gtk.Orientation.HORIZONTAL)
    button_close = Gtk.Button ()   
    button_close.set_icon_name ("window-close-symbolic")
    action_box.prepend (button_close)
    scroll = Gtk.ScrolledWindow () 
    textview = Gtk.TextView ()
    scroll.set_child (textview)
    overlay.add_overlay (action_box)   
    overlay.set_child (scroll) ()


Your GtkBox completely overlaps the scrolledwindow, so it catches all the events…

Try using alignment properties to control its expansion:

action_box = Gtk.Box (spacing=3, orientation=Gtk.Orientation.HORIZONTAL, halign=Gtk.Align.CENTER, valign=Gtk.Align.CENTER)

(by default is uses Gtk.Align.FILL)

1 Like

Thanks, it works, it’s what I need

1 Like