PDA

View Full Version : BorderPanel initial height issue with setTopComponent



Luming Lai
2 Sep 2009, 12:46 AM
Create a Viewport, set it to 100% width, height

Create a panel with BorderLayout (borderPanel), set the top component to an Html widget, make the widget have a height of (say) 100px, and add at least a center component with a 100% height to borderPanel.

Set the layout of the root panel to FitLayout, add your panel with the BorderLayout to it.

borderPanel's height will be miscalculated, resulting in the bottom of it hanging off the page initially. It works fine on resizes.

The only workaround I found was not using the setTopComponent on the borderPanel, in which case it seems to work fine.

sven
2 Sep 2009, 4:50 AM
Please read the bugforum guidelines and post a sample code that is demonstrating this. I am moving this to the help forum right now, as it works quite well in the explorer demo