• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Tim Cooke
  • Jeanne Boyarsky
  • Bear Bibeault
Sheriffs:
  • Knute Snortum
  • paul wheaton
  • Devaka Cooray
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Ron McLeod
  • Piet Souris
  • Ganesh Patekar
Bartenders:
  • Tim Holloway
  • Carey Brown
  • salvin francis

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

 
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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 *********|
|**********| ------*******************************|
|**********| ____ ***************************** |
 
He loves you so much! And I'm baking the cake! I'm going to put this tiny ad in the cake:
Java file APIs (DOC, XLS, PDF, and many more)
https://products.aspose.com/total/java
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!