File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes GWT and the fly likes Container to Stretch Vertically with resizing of content  -Whats the best layout to use? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » GWT
Bookmark "Container to Stretch Vertically with resizing of content  -Whats the best layout to use?" Watch "Container to Stretch Vertically with resizing of content  -Whats the best layout to use?" New topic
Author

Container to Stretch Vertically with resizing of content -Whats the best layout to use?

conor o callaghan
Greenhorn

Joined: Oct 01, 2011
Posts: 5
Basically I'm creating a comment box similar to the one they have in facebook.
It will contain a main Comment - then sub comments.

My issue is that when a user adds a comment I want to overall component to resize (vertically) to make room for the new comment.

One obvious option is to just get the height of the new comment area and resize the container but there seems like there should be a more trivial way of doing this.

Currently I have a DockLayoutPanel -

West - is just a user icon - I want that space
North - is the main comment
Center - is a VerticalLayout - I was hoping that as the verticallayout panel is populated the whole component would resize.
NOTE: this docklayout panel -i.e. the whole component is in a scrollpane - I want several of these components...


Any ideas would be greatly appreciated!

Apologies for the badly formatted image!
________________________________________________
| **********|*********************************** |
| User Img| | *********************************** |
|__________| *****main comment****************** |
|**********| ***********************************|
|**********|____________________________________|
|**********| ____ ******************************|
|**********| | |*********user comment *********|
|**********| ------*******************************|
|**********| ____ ***************************** |
|**********| ____ ******************************|
|**********| | |*********user comment *********|
|**********| ------*******************************|
|**********| ____ ***************************** |
|**********| ____ ******************************|
|**********| | |*********user comment *********|
|**********| ------*******************************|
|**********| ____ ***************************** |
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Container to Stretch Vertically with resizing of content -Whats the best layout to use?
 
Similar Threads
Trying to understand how layouts resize
Dialog with scroll bar for text and resizable
advanced flickering
Screen moves on its own
Wrapping components in a container