Tuesday, August 28, 2012

Re: FlowPanel problem.

float: left worked perfectly - thank you very much!


On Saturday, August 25, 2012 4:55:59 AM UTC+1, Alfredo Quiroga-Villamil wrote:
This should be of help:

https://developers.google.com/web-toolkit/doc/latest/DevGuideUiPanels#LayoutPanels

"HorizontalPanel is a bit trickier. In some cases, you can simply
replace it with a DockLayoutPanel, but that requires that you specify
its childrens' widths explicitly. The most common alternative is to
use FlowPanel, and to use the float: left; CSS property on its
children. And of course, you can continue to use HorizontalPanel
itself, as long as you take the caveats above into account."

Best regards,

Alfredo



On Thu, Aug 23, 2012 at 11:16 AM, Antoine Lever
<antoine...@gmail.com> wrote:
> I want to add a number of DecoratorPanels horizontally until there's no more room and then move onto another row.  I'm therefore trying to use a FlowPanel.  No matter what I do, the DecoratorPanels appear vertically and not horizontally.  What am I doing wrong?  Please help!
>
> Thank you
>
>         public void onModuleLoad() {
>                 FlowPanel fp = new FlowPanel();
>
>                 AbsolutePanel ap1 = new AbsolutePanel();
>                 AbsolutePanel ap2 = new AbsolutePanel();
>                 AbsolutePanel ap3 = new AbsolutePanel();
>
>                 DecoratorPanel dp1 = new DecoratorPanel();
>                 DecoratorPanel dp2 = new DecoratorPanel();
>                 DecoratorPanel dp3 = new DecoratorPanel();
>
>                 ap1.setSize("50px", "100px");
>                 ap2.setSize("50px", "100px");
>                 ap3.setSize("50px", "100px");
>
>                 dp1.add(ap1);
>                 dp2.add(ap2);
>                 dp3.add(ap3);
>
>                 fp.add(dp1);
>                 fp.add(dp2);
>                 fp.add(dp3);
>
>                 RootPanel.get().add(fp);
>             }
>
> --
> You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
> To view this discussion on the web visit https://groups.google.com/d/msg/google-web-toolkit/-/uYjm10JAoH8J.
> To post to this group, send email to google-we...@googlegroups.com.
> To unsubscribe from this group, send email to google-web-toolkit+unsubscribe@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
>



--
Alfredo Quiroga-Villamil

AOL/Yahoo/Gmail/MSN IM:  lawwton

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

No comments:

Post a Comment