Hi,

as happened so often: While preparing a minimal code example I found the 
problem myself: My SplitLayoutPanel was not inserted into the surrounding 
DockLayoutPanel directly. There was a ScrollPanel between, so that the 
south part of my SplitLayoutPanel was sized to 0. I don't know why, but 
going without ScrollPanel solved the problem.

Now the repositioning of the Splitters: I tried to do it within constructor 
of the containing panel, but - as expected - the size of the containing 
panel is 0 at this time. So I moved the repositioning into a deferred 
method, which should be called after the constructor has finished. But even 
then, the size of the containing panel is 0.

Below is the code.
What can I do?

Thanks
Magnus 

---


public class PortalPanel extends Composite
{

 private static PortalPanelUiBinder uiBinder = GWT
   .create (PortalPanelUiBinder.class);

 interface PortalPanelUiBinder extends UiBinder<Widget, PortalPanel>
 {
 }

 public PortalPanel()
 {
  initWidget (uiBinder.createAndBindUi (this));
  resetSplittersLater ();
 }

 private void resetSplittersLater ()
 {
  Scheduler.get().scheduleDeferred
  (
    new ScheduledCommand()
    {
     @Override
     public void execute()
     {
      resetSplitters ();
     }
    }
  );
 }

 public void resetSplitters ()
 {
  int ys = this.getOffsetHeight ();
  Window.alert ("h:" + ys); // -> 0
 }
 
}

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to