а

Show/Hide scrollbars on the gant on mouse hover


#1

Dear Support,

I want to ask if it’s possible to show scrollbar of the gantt only on mouse hover, It should be hidden by default.

Thanks in advanced.

Regards,


#2

Hi @koda5,
In order to do this, you have two ways. You can change gantt.config.scroll_size, like in the snippet below:
https://snippet.dhtmlx.com/14ea4f408
This way has one issue- to apply config updates on the screen you should call gantt.init() the method and it will reset the scroll position of your gantt chart to start.
The second way is to change css styles of scroll bars directly, and doesn’t reload the whole gantt chart, like in the snippet below:
https://snippet.dhtmlx.com/a87d00ef3
I think that the second way works better, but you can choose which method better meets your requirements.
API:
gantt.config.scroll_size:
https://docs.dhtmlx.com/gantt/api__gantt_scroll_size_config.html


#3

Hi Siarhei,

Thank you, it works in both ways and definitely I will choose second option.

Regards,
Leon