0

When nesting a SplitLayoutPanel inside a DisclosurePanel the SplitLayoutPanel is not displayed, when openening the DisclosurePanel using relative height attributes (e.g., 100%). Inspecting the generated HTML yields that the row containing the SplitLayoutPanel (DisclosurePanel produces a table with two rows) has a height of 0px, but the width is determined correctly.

Am I doing something completely wrong? Removing the DisclosurePanel displays the SplitLayoutPanel correctly. Also setting the height of the SplitLayoutPanel to a absolute value (e.g., 500px) works.

Any suggestions are greatly appreciated.

<!DOCTYPE html>
<ui:UiBinder xmlns:ui="urn:ui:com.google.gwt.uibinder" xmlns:g="urn:import:com.google.gwt.user.client.ui">
<g:DisclosurePanel width="99%">
    <g:header>Some Header</g:header>
    <g:SplitLayoutPanel ui:field="mySplitLayoutPanel"
        width="100%" height="100%">
        <g:west size="200">
            <g:ScrollPanel ui:field="streamTreePanel" styleName="ccTreePanel" />
        </g:west>
        <g:center>
            <g:VerticalPanel ui:field="streamTablePanel"
                styleName="ccTablePanel" width="100%" />
        </g:center>
        <g:east size="400">
            <g:ScrollPanel ui:field="streamInfoPanel" styleName="ccInfoPanel" />
        </g:east>
    </g:SplitLayoutPanel>
</g:DisclosurePanel>

Florian Pilz
  • 337
  • 1
  • 12

1 Answers1

1

LayoutPanels require that an unbroken chain of ProvidesResize and RequiresResize parent widgets up to the RootLayoutPanel to work properly. In your case DisclosurePanel doesn't implement any of the interfaces.
You can either:

  • put your SplitLayoutPanel into a ResizeLayoutPanel
  • specify explicit dimensions in your DisclosurePanel (see Recipes for more info)
  • add your own ResizeHandler and resize the SplitLayoutPanel manually (call onResize()).
Ümit
  • 17,379
  • 7
  • 55
  • 74