开发者

How to implement Vertical layout

Is there a way to implement vertical layout using Dojo/Dijit? I don't like BorderLayo开发者_开发技巧ut because of the splitters.


Unless you really need some particular feature (that you did not mention) from BorderLayout it might be possible to just use plain old HTML+CSS & DOM manipulation instead:

var d = dojo.create('div', {}, parentNode);
d.appendChild(aWidget.domNode);
d.appendChild(dojo.create('div', {innerHTML: 'a plain HTML node'}));
d.appendChild(anotherWidget.domNode);
//...

EDIT: I just came across a case where I actually wanted a VerticalLayout, due to some code operating on the addChild and removeChild functions. I managed to implement it by just mixing in some existing classes:

var VerticalLayout = dojo.declare([dijit._Widget, dijit._Container], {});
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜