Fill up all height space

Hi guys!

I’ve a noob trouble but I can’t solve it.
So I just want to fill up all height space. It’s a tab that has only one component.
I’ve tried:
[color=#bfbfbf]

    taula.setHeight ("100%")
    taula.setHeight ("500px")
    taula.setSizeFull()
    layout.setExpandRatio(taula, 1.0f)
    taula.setSizeUndefined() + layout.expandRa...

[/color]

but anything works. Here is my code:
[color=#bfbfbf]

            Table taula = new Table ("myContacts");
	
	// Main layout
	VerticalLayout layout = new VerticalLayout();
	layout.setMargin(true);
	layout.setSpacing(true);
	layout.setSizeFull();
	
	layout.addComponent(taula);
	layout.setComponentAlignment(taula, Alignment.MIDDLE_CENTER);
	
	// Root
	setCompositionRoot(layout);

[/color]

Any idea? What I’m doing wrong?

thx!

Looks like your using the CustomComponent. Then you also need to set its size to 100% x 100% (the default size is 100% x undefined), so the contained layout component can expand to full height (100% * undefined == undefined == 0 in the browser).

So adding setSizeFull() to the constructor of your CustomComponent might solve the problem. Note, that you also need to specify the height of the layout where you place that CustomComponent, otherwise the same thing will happen, the outer layout will suppress the 100% height of the CustomComponent.

First of all, thx for your quick answer.

That was exactly my problem. My tab extends CustomComponent, finally I solved with:

setSizeFull();
//mainLayout
layout.setSizeFull();

and then setting size of my component (table).

Jouni I’ve read many of your post and… once again you save me :smiley:
You’re the boss xD !