I have a FormPanel inside a ScrollPanel. The ScrollPanel is located in the 
center part of DockLayoutPanel. I want to vertially and horizontally center 
the FormPanel inside the ScrollPanel. I tried a few ways to do this but no 
success.

I have tired putting a verticalPanel/horizontalPanel inside the scroll 
panel, and use it to wrap the formPanel. I set both scroll panel and 
horizontal panel to 100% width and height. However, the scroll panel is 
automatically resized according to the size of center part of 
DockLayoutPanel whereas the horizontal panel's size is always equals to the 
size of its child- form panel. So I cannot center the formpanel inside of 
horizontalPanel since their height and width are the same. I try to make 
the horizontalPanel's size be always the same as scrollPanel, but I have no 
idea how to do this. Setting horizontalPanel's size to 100% is not working.

So My question is this:

1.How do you center something in scrollPanel. I don't mind using css method 
if you know how to achieve this.

2.In my case above, is it possible to make the horizontalPanel to be always 
the same size as its parent container - scroll panel. If it is possible, my 
1st question is solved then.


<https://lh3.googleusercontent.com/-0cqjdwhIu9c/UBrHeusGm6I/AAAAAAAAAAk/pKLzixgw3X0/s1600/CCMap.png>


-- 
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/-/cgMYDhd-EksJ.
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