Protect Form from scrolling (mobile)

Hello,

I do not find a way to protect a Form from scrolling on mobile.

I want to have all objects (buttons, images, …) fixed on the screen - so if you swipe over the display all objects are fixed and do not move…

Is there a way?

In your documentation…

Form - NSB App Studio

…there is a propertiy called “scrolling” - but this is not or no longer available.

Any ideas?

THANK YOU!

I do not know the answer to this myself. However, since AppStudio is a wrapper around HTML/CSS/JS, if it can be done in with that, it can be done in AppStudio. This isn’t an AppStudio specific issue.

I spent a few minutes researching what people are doing for this, for both PWA and native apps. I found a large number of workarounds that people have tried, but no definitive solution. I may not have looked deeply enough.

If you see a solution which you’d like to try, but don’t know how to implement in AppStudio, we’ll be happy to help.

George, thanks for your response.

Found this:

And, maybe even more interesting, this:

There is also a live demo where you can enable / disable scrolling:
https://fl3nkey.github.io/scroll-lock/demos/index.html#ex-main

cu!

You can add .js modules to your project by dragging them in the Project Explorer. They will then be automatically loaded with your project and you can use them.

…it took me a while; but in the end it was very easy:

So, if someone is interested in the solution:

I wanted my forms (mobile apps) not to scroll when swiping over the screen.

I found this:

After George’s response I first did not know which .js files to add to my Project Explorer.

In the end I only had to download the file “scroll-lock.js” from the “dist” folder, drag it into my Project Explorer and add the following line to the Sub Main() of my Form:

scrollLock.disablePageScroll();

That’s it!!!

Thank you all (especially George) for your support!!!

Great!

Have a nice day and best wishes,

Olaf

1 Like

Thanks for posting this - I’m sure it will help people!