Question

I have seen some dojo apps at work that utilize layoutContainers but I have not found much in the way of justification for using said cotainers. What is the purpose of a dijit LayoutContainer? Does it provide orginization for widgets, and|or other benefits? Thanks

Was it helpful?

Solution

I would definitely start by reading the docs on both dijit/layout/LayoutContainer and a popular subclass, dijit/layout/BorderContainer, and the most commonly-used widget inside of LayoutContainer, dijit/layout/ContentPane. From the docs:

This widget is a container partitioned into up to five regions: left (or leading), right (or trailing), top, and bottom with a mandatory center to fill in any remaining space.

You use LayoutContainer to lay out related widgets. There is a great section on usage in the ContentPane docs, including the following:

You can use content panes by themselves, but usually you will place content panes inside of a layout container. For example, in a tabbed layout, content pane tags surround each tab of information.

One great use of LayoutContainers that I take advantage of is the automatic startup and resizing of widgets inside said containers.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top