SimplePager within FlowPanel

56 views
Skip to first unread message

Magnus

unread,
Jul 28, 2012, 8:31:24 PM7/28/12
to google-we...@googlegroups.com
Hi,

I have a FlowPanel with two elements: a ListBox and a SimplePager, and I add them in this order.

The SimplePager is always below the ListBox, even if there is enough space right beside the ListBox. I want the elements to line up in a row, i. e. that the SimplePager is displayed right beside the ListBox.

I have not done something special, just a FlowPanel with two chids.

What could be wrong?

Thanks
Magnus

Alfredo Quiroga-Villamil

unread,
Jul 28, 2012, 9:55:45 PM7/28/12
to google-we...@googlegroups.com
A few ways I am sure to accomplish this. One possible way that might
work for you it's to perhaps employ:

LayoutPanel lp = new LayoutPanel();

ListBox list = new ListBox();
list.addItem("Foo");

SimplePager sp = new SimplePager();

lp.add(list);
lp.add(sp);
lp.setWidgetLeftWidth(list, 0, Unit.PCT, 20, Unit.PCT);
lp.setWidgetRightWidth(sp, 0, Unit.PCT, 80, Unit.PCT);

RootLayoutPanel.get().add(lp);

A different approach can be using a HorizontalPanel.

Best regards,

Alfredo
> --
> 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/-/leyiI4nFi7UJ.
> To post to this group, send email to google-we...@googlegroups.com.
> To unsubscribe from this group, send email to
> google-web-tool...@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

Magnus

unread,
Aug 11, 2012, 9:32:26 PM8/11/12
to google-we...@googlegroups.com
Works! Thank you!

Magnus
Reply all
Reply to author
Forward
0 new messages