PDA

View Full Version : Scrolling content with hidden scrollbars



kkris1983
4 Apr 2012, 11:59 AM
Hello,

I am am looking for solution/assistance of following case. I have panel with layout: 'auto' which has form in its items collection. Form's width is much higher than its parent-panel container. I want to scroll the content of panel-container horizontally but with autoScroll disabled setting so scrollbars are invisible.
I noticed that

panel.getEl().dom.scrollLeft
works only if autoScroll is set to true but I do not want to show scrollbars.
My current solution bases on css display

.example-form-cls::-webkit-scrollbar{ display: none }
and

cls: 'example-form-cls'
for panel container. That way I am able to scroll content with the following code:
panel.getEl().dom.scrollLeft = VALUE;

My question is if there is a better way to deal with that task ?

I will appreciate for your assisstance

scottmartin
5 Apr 2012, 12:44 PM
Using CSS is the correct approach if you want scrolling, but not visible.

Regards,
Scott.

kkris1983
5 Apr 2012, 8:48 PM
Thank You.