adds a new view to a layout-like widget or moves an existing one
view | object | the configuration of the view |
index | number | the index a new view will be added at or an existing one will be moved to |
string|number | the id of the view |
webix.ui({
id:"mylayout",
rows:[...]
});
// adds a template as a third cell to some existing layout
$$("mylayout").addView({ template:"New one" }, 2);
// moves an existing child view to a different index
$$("mylayout").addView($$("child"), 3);
For this view, the index specified in addView() will have no visual effect since child views are placed at absolute coordinates. However, getChildViews() will return child views in the actual order.