Check documentation for the latest version of dhtmlxSuite setSizes DHTMLX Docs


adjusts the size of the sidebar when the parent's size is changed

void setSizes();


// init sidebar
var mySidebar = new dhtmlXSideBar({
    parent: "sidebarObj",
    template: "details",
    icons_path: "icons/16x16/",
    width: 160,
    items: [
        {id: "a1", text: "Item 1", icon: "image1.png", selected: true},
        {id: "a2", text: "Item 2", icon: "image2.png"}
// if you change parent's size
document.getElementById("parentId").style.width = "800px";
document.getElementById("parentId").style.height = "600px";
// sidebar needs to be adjusted

Back to top