dojo widget layout

烈酒焚心 提交于 2019-12-12 02:12:20

问题


Currently I am porting client side of my application from Active X to Dojo. This is first time Iam working with dojo. I have looked at Dojo layout documentation but I am not sure how can I use them for my purposes. The dialogs in my application are typically look like the attached image


回答1:


First, you don't need to use dojo's layout widget, you can always use HTML and CSS to create you own layout. The layout widget can help you to layout different components in you page, but it also introduces runtime overhead.

From your picture, the only layout widget you should use is dijit.layout.SplitContainer. It seems that the dialog is consisted of two vertical parts. If the user is allowed to adjust the relative size of these two parts, use dijit.layout.SplitContainer. Otherwise, use plain HTML and CSS to layout the widget.

If you do want to use layout widget to simplify the layout, you can use dijit.layout.BorderContainer to layout different components. For example, you can put the buttons into the bottom region of the BorderContainer and put the edit box in the center region.



来源:https://stackoverflow.com/questions/7318172/dojo-widget-layout

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!