StupidBeauty
Read times:284Posted at:Tue Jul 5 19:54:00 2011
- no title specified

Wt3.1.9文档翻译:Wt::WBorderLayout类参考,Wt::WBorderLayout Class Reference

详细描述

这个布局管理器能将容器的区域分隔成5个区域

5个区域是这样组成的:

(North)

西(West)

(Center)

(East)

(South)

每个区域最多只能包含一个部件,而且除咯中间 (Center)区域以外,其它区域的部件都是可选的。

北区和南区的部件需要让中间区域的部件占用所有可用的空间。

这个布局管理器可以应用到WContainerWidgetExt::Container 容器部件中。它们使用那些部件的不同属性来确定边缘面板的高度

使用示例:

Wt::WContainerWidget *w = new Wt::WContainerWidget(this);

Wt::WBorderLayout *layout = new Wt::WBorderLayout();

layout->addWidget(new Wt::WText("West-side is best"), Wt::West);

layout->addWidget(new Wt::WText("East-side is best"), Wt::East);

layout->addWidget(contents, Wt::Center);

//使用布局对象,但是不要在竖直方向对齐

w->setLayout(layout, Wt::AlignTop | Wt::AlignJustify);

注意

当在一个WContainerWidget 中使用的时候,这个布局管理器接受以下提示(参考 setLayoutHint() ):

  • •."table-layout",可选值是"auto"(默认)或"fixed"。
    使用"fixed"以避免嵌套的表格溢出到布局之外。在那种情况下,你将需要为那些没有拉伸因子的列中每一列的最少一个条目指定一个宽度 (使用CSS 或其它方法)。

警告:

如果容器没有高度限制的话,你应当在 WContainerWidget::setLayout() 的对齐标志中指定AlignTop 。否则会发生怪异的事情 (亲代容器会继续变大)

Your opinions
Your name:Email:Website url:Opinion content:
- no title specified

HxLauncher: Launch Android applications by voice commands

 
Recent comments
2017年4月~2019年4月垃圾短信排行榜Posted at:Thu Sep 26 04:51:48 2024
Qt5.7文档翻译:QWebEngineCookieStore类,QWebEngineCookieStore ClassPosted at:Fri Aug 11 06:50:35 2023盲盒kill -9 18289 Grebe.20230517.211749.552.mp4