I am trying to have a Frame inside a SplitLayoutPanel. The left side
of the SplitLayoutPanel contains a simple widget such as a
SimplePanel. The Frame goes in the right of the SplitLayoutPanel.
I have it working, but with a serious problem: when I drag the
splitter to the right (so that the mouse cursor moves over the Frame
as the splitter tries to keep up), the resizing action stops.
In the example code (below) I added a header panel above the Frame.
When I click on the splitter and drag the mouse cursor up and to the
right, so it hovers over the header panel rather than over the Frame
itself, the resizing works perfectly.
Can anyone give me a clue about having a Frame resize properly within
a SplitLayoutPanel?
Thanks!
import com.google.gwt.core.client.EntryPoint;
import com.google.gwt.user.client.DOM;
import com.google.gwt.user.client.Window;
import com.google.gwt.user.client.ui.Frame;
import com.google.gwt.user.client.ui.DockLayoutPanel;
import com.google.gwt.user.client.ui.SplitLayoutPanel;
import com.google.gwt.user.client.ui.RootLayoutPanel;
import com.google.gwt.user.client.ui.SimplePanel;
import com.google.gwt.dom.client.Style.Unit;
public class Problem implements EntryPoint
{
public void onModuleLoad()
{
DockLayoutPanel mainPanel = new DockLayoutPanel(Unit.EM);
SplitLayoutPanel splitPanel = new SplitLayoutPanel();
SimplePanel westPanel = new SimplePanel();
DOM.setStyleAttribute(westPanel.getElement(), "backgroundColor",
"red");
Frame frame = new Frame("http://www.google.com/");
frame.setWidth("100%");
frame.setHeight("100%");
splitPanel.addWest(westPanel, 200);
splitPanel.add(frame);
SimplePanel headerPanel = new SimplePanel();
DOM.setStyleAttribute(headerPanel.getElement(), "backgroundColor",
"yellow");
SimplePanel footerPanel = new SimplePanel();
DOM.setStyleAttribute(footerPanel.getElement(), "backgroundColor",
"green");
mainPanel.addNorth(headerPanel, 8);
mainPanel.addSouth(footerPanel, 5);
mainPanel.add(splitPanel);
RootLayoutPanel.get().add(mainPanel);
}
}
--
You received this message because you are subscribed to the Google Groups
"Google Web Toolkit" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/google-web-toolkit?hl=en.