Skip to main content

Custom scroll

info

This functionality requires the PRO version of the DHTMLX Suite package.

From v7.2, DHTMLX includes custom scrollbars with a thin, grey, semi-transparent design that replace the standard browser scrollbars. The custom bars hide automatically: they stay hidden until the user hovers the mouse over the page.

The custom scroll is available for the following DHTMLX components: List, DataView, Grid, Grid in the TreeGrid mode, Layout cell, Toolbar, Ribbon, Sidebar, and Window.

Set the enable property of the dhx.scrollViewConfig global variable to true before you initialize the widgets:

// enable the custom scroll for all available widgets
dhx.scrollViewConfig.enable = true;

// initialize a widget
const list = new dhx.List("list_container", {
itemHeight: 30
});

To enable the custom scroll after initialization, apply the enable() method of the scrollView object:

// initialize the widget
const list = new dhx.List("list_container", {
template: listTemplate,
itemHeight: 52,
height: "100%",
dragMode: "both",
});
list.data.load(data);

// enable custom scroll
list.scrollView.enable();

For more details, read the custom scroll configuration article.

Custom scroll in Optimus demos​

All DHTMLX demos built with Optimus have the custom scroll enabled.

Hospital management demo grid with thin custom scrollbars enabled in DHTMLX Suite

View the live demos to check the feature:

DemoRelated article
File ExplorerFile Explorer guide
UI DashboardUI Dashboard guide
Hotel Management TemplateHotel Management guide
Geo TrackingGeo Tracking guide
Hospital ManagementHospital Management guide
Sales KPI TrackingSales KPI Tracking guide
Online Exam SystemOnline Exam System guide