Vertical align elements in FlowPanel?

186 views
Skip to first unread message

membersound

unread,
Dec 28, 2012, 4:40:01 AM12/28/12
to google-we...@googlegroups.com
Hi,

how can I vertically center elements within a FlowPanel? I have several FocusPanels inside a FlowPanel, which means they are stacked on each other. One of the focuspanels has an image, which should be centered both horizontally and vertically within that focuspanel. But no matter what I tried, it is always placed at the top of this panel.

<g:FlowPanel>
  <g:FocusPanel>
    <g:Image resource='{res.myimage}' />
  </g:FocusPanel>

  <g:FocusPanel>
    ...
</g:FlowPanel>

Can anyone help?

Mike Dee

unread,
Dec 28, 2012, 7:16:01 PM12/28/12
to google-we...@googlegroups.com
You may be able to do it with CSS, but FlowPanels are not meant for controlling layout as you desire (centering).  Can you try one of the other Panels, like VerticalPanel or LayoutPanel?

Kody

unread,
Dec 29, 2012, 7:25:41 AM12/29/12
to google-we...@googlegroups.com
OK then I'll go for VerticalPanel. 
Reply all
Reply to author
Forward
0 new messages