PDA

View Full Version : Problem in resizing application in onWindowResize



livinglegends
3 Jun 2009, 9:42 PM
Hi,

I have one typical problem in application while trying to resize components according to the size of RootPanel. I am using onWindowResize function. My code to resize components has been written in this function.

In my application, I have one treeview in left window with two options. When I click on first option, it will open first window in one tab and second one will open in another tab. In each tab, I have component say TreeTable.
Now, I have overridden onWindowResize function in each panel to resizes TreeTable components.

When I resize my application(maximize, increase size of application by dragging window, restore), it perfectly resizes size of components.

I have two scenarios.

1). Code works in below situation:

Suppose I have opened only one tab from left treeview. Now, I am resizing application so component (TreeTable) in the panel properly resizes accordingly. (I have overrided onWindowResize function in this panel).</p>2) Code doesn't works in below situation:

Suppose I open another tab from left treeview. Now, I have two tab opened in tab panel. Now, I am resizing application using dragging. So, panel which is currently visible, component(TreeTable) in that panel resizes properly. But, when I switched to another panel, though onWindowResize function of this panel already called(I have put System.out.println to check it) component in this panel doesnt resize properly. In short, when I resize application, current visible panel's component resizes propely but other panels' component doesn't resize, though onWindowResize function of each panel has been called properly.

I hope you got my problem and scenarios.

If not please ask me so I can explain where u didn't get the point.
It is very crucial for me to solve this issue ASAP.

Thanks and Regards
LivingLegends