Skip to main content

Layout API overview

Layout API#

Layout methods#

destructor()removes a Layout instance and releases occupied resources
forEach()iterates over all specified layout cells
getCell()returns the config object of a cell
removeCell()removes a specified cell

Layout events#

afterAddfires after adding a new cell
afterCollapsefires after a cell is collapsed
afterExpandfires after expanding a Layout cell
afterHidefires after a cell is hidden
afterRemovefires after removing a cell
afterResizeEndfires after resizing of a cell is ended
afterShowfires after a cell is shown
beforeAddfires before adding a cell
beforeCollapsefires before a cell is collapsed
beforeExpandfires before expanding a Layout cell
beforeHidefires before a cell is hidden
beforeRemovefires before removing a cell
beforeResizeStartfires before resizing of a cell has started
beforeShowfires before a cell is shown
resizefires on resizing a cell

Layout properties#

colsan array of columns objects
rowsan array of rows objects

Cell API#

Cell methods#

attach()attaches a DHTMLX component into a Layout cell
attachHTML()adds an HTML content into a dhtmlxLayout cell
collapse()collapses a specified cell
expand()expands a collapsed cell
getParent()returns the parent of a cell
getWidget()returns the widget attached to a layout cell
hide()hides a specified cell
isVisible()checks whether a cell is visible
paint()repaints Layout on a page
show()shows a hidden cell
toggle()expands/collapses a Layout cell

Cell properties#

alignsets the alignment of content inside a cell
collapsabledefines whether a cell can be collapsed
collapseddefines whether a cell is collapsed
cssthe name of a CSS class(es) applied to Layout
gravitysets the "weight" of a cell in relation to other cells placed in the same row and within one parent
headeradds a header with text for a cell
headerHeightsets the height of a Layout cell
headerIconan icon used in the header of a cell
headerImagean image used in the header of a cell
heightsets the height of a cell
hiddendefines whether a cell is hidden
htmlsets HTML content for a cell
idthe id of a cell
maxHeightthe maximal height to be set for a cell
maxWidththe maximal width to be set for a cell
minHeightthe minimal height to be set for a cell
minWidththe minimal width to be set for a cell
onadds handlers to DOM events of a cell
paddingdefines the distance between a cell and the border of layout
resizabledefines whether a cell can be resized
typedefines the type of borders between cells inside a layout
widthsets the width of a cell