Bug #257

WBoxLayout uneven spacing

Added by Alexander Katovsky about 2 years ago. Updated almost 2 years ago.

Status:Closed Start:01/03/2010
Priority:Normal Due date:
Assigned to:- % Done:

0%

Category:-
Target version:-

Description

In this example:

Wt::WContainerWidget *w = new Wt::WContainerWidget();
Wt::WBoxLayout *layout = new Wt::WBoxLayout(Wt::WBoxLayout::TopToBottom);
layout->addWidget(new Wt::WText("One"));
layout->addWidget(new Wt::WText("Two"));
layout->addWidget(new Wt::WText("Three"));
layout->addWidget(new Wt::WText("Four"));
w->setLayout(layout);

The vertical space between One and Two is smaller than that between the others.

History

Updated by Alexander Katovsky about 2 years ago

If you add AlignMiddle to AddWidget, then this is resolved. Not a bug!

Updated by Koen Deforche about 2 years ago

  • Status changed from New to Resolved

Hey Alexander:

another thing is to make sure that the vertical size of the container w is constrained when setting a layout (either using an explicit size or by being contained itself in a layout), or set the layout using AlignTop.

Regards,
koen

Updated by Koen Deforche almost 2 years ago

  • Status changed from Resolved to Closed

Also available in: Atom PDF