How to scroll inside UMG ScrollBox on mobile?

Hi there,

so I have a UMG ScrollBox with multiple buttons in it and it works fine. Using a mouse wheel, I can scroll inside the ScrollBox without using the scroll bar on the right side.

On touch devices (in my Android build) I obviously have no mouse wheel so the only way to scroll is to use the scroll bar but it is quite hard to hit the scroll bar with the finger. I don’t want to set the thickness to, say, 30.0 because it doesn’t look good. I actually wanted to hide the scroll bar…

My question is if I can scroll on a touch device like if I had a mouse wheel. Maybe by detecting if I touch-and-swipe in the region of the ScrollBox or something like that?

Thanks

So I could use buttons and work with the SetScrollOffset blueprint node but isn’t there a way to do this with a touch / swipe gesture?

So I now created UMG buttons to scroll up and down and set the Scroll Bar visibility to hidden. There were multiple issues because as of now there are no get nodes for the maximum scroll offset or the scroll box height (see this forum thread). This is not an acutal solution but at least it works.

There’s a workaround by adding a button and setting the button’s click method to “precise touch”. Then even once you hid the button, you could scroll the content with just a left click or a single touch for mobile.

It works well!

Divo is correct, you can do this by setting “precise click/precise touch”. I made a tutorial going over this for people who are more visual learners!

if your scrollbox have button as child,you must set zhe button’s click method to “precise click” ,touch method to “Precise tap” and press method to “button release”

1 Like