Re sizing in Split Lay out Panel

100 views
Skip to first unread message

Sanjay Jain

unread,
Jan 12, 2012, 7:03:56 AM1/12/12
to google-we...@googlegroups.com
Hello All,
I am using GWT 2.4 for my application.In this application for one page I have used SplitLayoutPanel.In this SplitLayoutPanel on west side I added a panel and at center side I added a panel.

Now at initial center panel having the size 100%.In other word west panel has 0 width.Now at some condition I want to re size it to 40%.So at this time center panel will have 60% width.

For this I tried below code.

getsplitPanel().remove(getLeftPanel());
getsplitPanel().addWest(getMenuPanel(), 300);

In this I removed the west panel and added it again with new width.

 Caused by: java.lang.AssertionError: No widget may be added after the CENTER widget

Now I searched for this error and got solution.It is to use layout Panel instead of Split Layout Panel.
But it doesn't have split and ant dragging facility. 

So I am not getting how to re size west part on some condition. 

membersound

unread,
Feb 26, 2013, 6:22:02 AM2/26/13
to google-we...@googlegroups.com
I have the same error using DockLayoutPanel when re-adding a west panel. Did you find a solution?

Jens

unread,
Feb 26, 2013, 6:45:18 AM2/26/13
to google-we...@googlegroups.com
You dont have to remove and re-add it. JavaDoc: SplitLayoutPanel.setWidgetHidden() / SplitLayoutPanel.setWidgetSize()
Reply all
Reply to author
Forward
0 new messages