Hello,
Try to add the following CSS property float:left; for your labels/any div
inside the FlowPanel
for (int i = 0; i < 30; i++) {
         Label a = new Label();
         a.setText("test" + i);
         a.getElement().getStyle().setProperty("float", "left");
         flowPanel.add(a);
       }
regards,
ruds

On Tue, Oct 27, 2009 at 11:29 AM, Halabe <elie.toumahal...@gmail.com> wrote:

>
> Hi,
>
> I am trying to add labels to a flowPanel.
>
> The labels are being added each one on a line which does not reflect
> the real behavior of the flowPanel which is to have them on the same
> line and when the width is full to go to the second line.
>
> I tried substituting the label by a checkbox and a textbox and it
> worked.
>
> Any idea?
>
> Thank you.
>
> Here is the code I am using:
>
> [code]
>  FlowPanel flowPanel = new FlowPanel();
>  flowPanel.ensureDebugId("cwFlowPanel");
>
>        for (int i = 0; i < 30; i++) {
>          Label a = new Label();
>          a.setText("test" + i);
>          flowPanel.add(a);
>        }
> [/code]
>
> >
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to google-web-toolkit@googlegroups.com
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to