Gtk.ScrolledWindow: how to scroll even when there isn't "enough" content?

How to enable scrolling in a Gtk.ScrolledWindow even if the content is not large enough to activate scrolling?
Example: I have only two rows in a Gtk.ListBox, those two rows are not large enough to enable scrolling but I still want one of them to be “scrolled out” of the visible area.
The reason I want this is to implement pull to refresh.


Seems like it would be easier to just use a container with a revealer placed in the first position, or even inserting the revealer as the first item in the list, that toggles when the edge is reached rather than making a complicated list widget.

But I haven’t tried to implement this so… I could be way off.

I was thinking of doing something on those lines but it is still not possible to disable edge-overshot so I would have a weird animation above or over the “refresh row”.

So, again I haven’t tried anything but I don’t see why that would be the case?

If the scrolled window is at the top don’t forward the scroll event or gesture to it and reveal your refresh info widget instead.

I thought that was the case because of this issue.

How can I intercept scroll events like that?

Try adding dummy rows until it overflows.

I was thinking of 3, if you’re using 4 then I don’t know I guess there’s no way.

I’m using 3 but I guess I will eventually be using 4.

Intercepting events using 3 shouldn’t be a problem.

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