Skip to main content

Layout API overview

Layout API

Layout methods

NameDescription
destructor()removes a Layout instance and releases occupied resources
forEach()iterates over all specified layout cells
getCell()returns the config object of a cell
progressHide()hides the progress bar in the Layout container
progressShow()shows the progress bar in the Layout container
removeCell()removes a specified cell

Layout events

NameDescription
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

NameDescription
colsOptional. An array of columns objects
cssOptional. The name of a CSS class(es) applied to Layout
rowsOptional. An array of rows objects
typeOptional. Defines the type of borders between cells inside a layout

Cell API

Cell methods

NameDescription
attach()attaches a DHTMLX component into a Layout cell
attachHTML()adds an HTML content into a Layout cell
collapse()collapses a specified cell
detach()detaches an attached DHTMLX component or HTML content from a 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
progressHide()hides the progress bar in a cell
progressShow()shows the progress bar in a cell
show()shows a hidden cell
toggle()expands/collapses a Layout cell

Cell properties

NameDescription
alignOptional. Sets the alignment of content inside a cell
collapsableOptional. Defines whether a cell can be collapsed
collapsedOptional. Defines whether a cell is collapsed
cssOptional. The name of a CSS class(es) applied to a cell of Layout
gravityOptional. Sets the "weight" of a cell in relation to other cells placed in the same row and within one parent
headerOptional. Adds a header with text for a cell
headerHeightOptional. Sets the height of the header of a Layout cell
headerIconOptional. An icon used in the header of a cell
headerImageOptional. An image used in the header of a cell
heightOptional. Sets the height of a cell
hiddenOptional. Defines whether a cell is hidden
htmlOptional. Sets HTML content for a cell
idOptional. The id of a cell
maxHeightOptional. The maximal height to be set for a cell
maxWidthOptional. The maximal width to be set for a cell
minHeightOptional. The minimal height to be set for a cell
minWidthOptional. The minimal width to be set for a cell
onOptional. Adds handlers to DOM events of a cell
paddingOptional. Defines the distance between a cell and the border of layout
progressDefaultOptional. Defines whether the progress bar must be shown in a cell in the absence of the component/HTML content in the cell
resizableOptional. Defines whether a cell can be resized
typeOptional. Defines the type of borders between cells inside rows and columns of a layout
widthOptional. Sets the width of a cell