Project

General

Profile

Vertical alignment ?

Added by Jan Goyvaerts about 13 years ago

I've been trying to align the content of a WContainerWidget both horizontally and vertically. The horizontal is no problem. I can't seem to make the vertical alignment work though. For example:

final WContainerWidget main = new WContainerWidget();

main.setContentAlignment(AlignmentFlag.AlignCenter,AlignmentFlag.AlignMiddle);

main.addWidget(createTitleWidget(name));

main.setWidth(new WLength(300));

main.setHeight(new WLength(100));

I've tried various approaches. But still the content is alligned vertically to the top. Is this the way it should work ? Or am I missing something here ?

TIA !!!

Jan


    (1-1/1)