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

sql - invalid in the select list because it is not contained in either an aggregate function -

Angularjs unit testing - ng-disabled not working when adding text to textarea -

How to start daemon on android by adb -