5 Answers, 1 is accepted
Hello Axel,
The targeted functionality can be implemented by adding a width property to the DOM element inside the scroller and then refresh the scroller using the animatedScrollTo method.
This example demonstrates how the targeted functionality can be realized. To simulate runtime change, I've used the setTimeout function as follows:
setTimeout(function(){
$("#scrollerContent").css("width", "400px");
$("#scroller").data("kendoMobileScroller").animatedScrollTo(0, 0);
},2000)
With the above, two seconds after the page is initialized the horizontal scroller will appear.
I hope the above will help you implement the targeted functionality in your application.
Regards,
Petar
Progress Telerik
Our thoughts here at Progress are with those affected by the outbreak.
Hi Petar,
I am sorry that I have expressed myself so imprecisely.
I want the end user to determine whether the scroll bars are showing continuously or only when scrolling.
In other words, I need the configuration flag "visibleScrollHints" as a method.
Thank you
Hi Axel,
I am afraid that there is no such method that can control the visibleScrollHints configuration dynamically.
What you can try is to control the visibility of the horizontal scrollbar using a snippet similar to the below:
$(".km-touch-scrollbar.km-horizontal-scrollbar").css("visibility", "hidden");
The marked in yellow code selects the horizontal scrollbar. Based on the business logic of your application, the above can be used to hide/show the horizontal bar.
Regards,
Petar
Progress Telerik
Our thoughts here at Progress are with those affected by the outbreak.
Hello Petar,
For the sake of completeness
Unfortunately, this only works once. After another scrolling it is visible again.
It would work if there was some kind of scroller event "onAnimationEnd" where you set the visibility back to "hidden".
Thanks for your help