PDA

View Full Version : Browser window resizing triggers layout change but manual doLayout doesn't



ChrisR
30 Nov 2011, 7:37 AM
I've got some issues with form fields embedded inside a tabpanel not being laid out properly, in order to fix it i thougt I'd do a doLayout() on the tab when it's activated but that doesn't seem to work.

Yet when I resize my browser window all of a sudden everything pops right into place. Is there a way I can manually trigger the layout recalculations that are otherwise triggered by the user resizing his browser window?

mitchellsimoens
30 Nov 2011, 11:52 AM
doLayout is what you want but I think it's a timing thing in your code.

ChrisR
30 Nov 2011, 1:24 PM
Triggering it in the activate event listener of the panel isn't the right time it appears since that's something i tried.

For one reason or another triggering doLayout on any parent container doesn't do the trick while resizing the browser window any time does work.