dojo小部件布局 [英] dojo widget layout

查看:130
本文介绍了dojo小部件布局的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

目前,我正在将我的应用程序的客户端从Active X移植到Dojo。这是Iam与dojo一起工作的第一次。我看过Dojo布局文档,但我不知道如何将它们用于我的目的。我的应用程序中的对话框通常看起来像附加的图像

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

推荐答案

首先,您不需要使用dojo的布局窗口小部件,您可以随时使用HTML和CSS创建自己的布局。布局窗口小部件可以帮助您在页面中布局不同的组件,但也会引入运行时开销。

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.

从您的图片中,您应该使用的唯一布局窗口小部件是 dijit.layout.SplitContainer 。对话框似乎由两个垂直部分组成。如果允许用户调整这两个部分的相对大小,请使用 dijit.layout.SplitContainer 。否则,使用纯HTML和CSS布局窗口小部件。

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.

如果您想使用布局窗口小部件来简化布局,可以使用 dijit .layout.BorderContainer 布局不同的组件。例如,您可以将按钮放入 BorderContainer 底部区域,并将编辑框放在 center region。

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.

这篇关于dojo小部件布局的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆