PDA

View Full Version : Margins + Paddings



Arno.Nyhm
27 Aug 2009, 1:39 AM
i am a little bit confused.

i dont know how to set Paddings or Margins to some Items (maybe any items but more to some contentpanels / layoutcontainers )

i see there is in El a setPadding but not a setMargin
in some layoutData i can use Margins - but not Paddings ...

is there a good way to easy set this paddings or margins?


PS:
i know there are some solutions settings this directly with setBodyStyle / setStyleAttribute but i dont like to this methods directly... it looks more like a patch ;-)

sven
27 Aug 2009, 1:44 AM
I just added setMargins to the El class.

Arno.Nyhm
27 Aug 2009, 4:47 AM
thx :-)

so i can use it this!?:


myWidget().el().setPaddings(myPaddings);


PS: make it sense to add this setPaddings/setMargins also to BoxComponent?