css - Centering components in a Layout -


i'm trying center picture , label vertical layout here's code wrote:

    picture = new embedded(null,  brandableresourcehelper.getinstance().newresource("image/icon.png"));     lab = new label();     lab.setwidth(100, units_percentage);      verticallayout col = new verticallayout();     col.addcomponent(picture);     col.addcomponent(lab);     col.setwidth(30, units_percentage);     col.setcomponentalignment(picture, alignment.middle_center);     col.setcomponentalignment(lab, alignment.middle_center); 

here's wanna get:

enter image description here

here's i'm getting:

enter image description here


Comments

Popular posts from this blog

AbotX : How do you create a parallel crawler that stays on and can be added to at run time from new requests -

testing - Detect whether test has failed within fixture -

android - Create single AAR file from multiple modules using Gradle -