I need to create a GWT Custom Widget. This widget will contain a panel and that widget must grow in height based on the amount of text in the panel
Edit:
for e.g. let’s say a widget will hold a forum post. What happens is that there is a panel inside the widget that hold the forum post. The more text text, the greater the panel??
Any idea??
If you put a
Labelin aFlowPanel, the whole thing will size itself to contain whatever text you put in theLabel. Most GWT widgets will do that as long as you don’t set an explicit size.Once you start setting the size (e.g. “height: 100px”) yourself, then you have to start re-calculating the size yourself. So… don’t set the size yourself! 🙂