Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

how to add margins to FlowPanel?

Tags:

gwt

I'm using com.google.gwt.user.client.ui.FlowPanel Widgets are very close to each other. However I can't figure out how to set margins?

BTW probably there are better layouts? I just need a container for several Anchors that located one by one.

like image 741
Oleg Vazhnev Avatar asked Oct 22 '25 15:10

Oleg Vazhnev


1 Answers

You can do it either programmatically :

flowPanel.getElement().getStyle().setProperty("margin", "10px");

Or with a CSS class that declares a margin (YourCssClassWithMargin{ margin: 10px; }) :

-> if you use UiBinder add the CSS style this way :

<g:FlowPanel styleName='YourCssClassWithMargin'>

-> if you don't use UiBinder this way :

flowPanel.addStyleName("YourCssClassWithMargin");

like image 57
kgautron Avatar answered Oct 25 '25 12:10

kgautron



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!