开发者

CellPadding on VerticalPanel (GWT)

开发者 https://www.devze.com 2022-12-29 15:45 出处:网络
I am trying to set a cellpadding value for my vertical panel. There is an API to set cellspacing (CellPanel.setSpacing()) but none for setting the cellpadding.

I am trying to set a cellpadding value for my vertical panel. There is an API to set cellspacing (CellPanel.setSpacing()) but none for setting the cellpadding.

How do I go about doing this?开发者_如何学运维


I did it like this:

myVerticalPanel.getElement().setAttribute("cellpadding", "5");

Carnell's answer does not work for IE7 and earlier versions.


You should use css to do this. Refer to the dev guide. Basically you want to set a style name on the panel using one of the setStyle* methods. Once you do this you use css to apply the styles for the particular name.

0

精彩评论

暂无评论...
验证码 换一张
取 消