Search code examples
cssgwtgxtuibinder

Can't get padding property from ContentPanel in Sencha GXT


So I have ContentPanel instantiated via UiBinder. After I've created it with initWidget(uiBinder.createAndBindUi(this)); I'm trying to get it's body right padding. Have tried all of these methods :

panel.getBody().getAttribute("paddingRight");
panel.getBody().getPadding(com.sencha.gxt.core.client.Style.Side.RIGHT);
panel.getBody().getComputedStyle("paddingRight");
panel.getBody().getPropertyString("paddingRight");
panel.getBody().getPropertyInt("paddingRight");
panel.getBody().getStyle().getPadding();
panel.getBody().getStyle().getPaddingRight();
panel.getBody().getStyle().getProperty("paddingRight"));

But all of them returning just 0 or null. Tried to get "padding-right", still no results. Any help?


Solution

  • I've already solved my problem - should call

    panel.getBody().getPadding(com.sencha.gxt.core.client.Style.Side.RIGHT);  
    

    in onLoad() of parent Composite.