开发者

UiBinder and SplitLayoutPanel not displaying

开发者 https://www.devze.com 2023-01-11 09:05 出处:网络
I\'m having some trouble getting a SplitLayoutPanel to display using UiBinder. It seems like the SplitLayoutPanel is hidden when the page loads. Thanks

I'm having some trouble getting a SplitLayoutPanel to display using UiBinder. It seems like the SplitLayoutPanel is hidden when the page loads. Thanks

Here's my code:

<!DOCTYPE ui:UiBinder SYSTEM "http://dl.google.com/gwt/DTD/xhtml.ent">
<ui:UiBinder xmlns:ui="urn:ui:com.google.gwt.uibinder"
    xmlns:g="urn:import:com.google.gwt.user.client.ui"
    xmlns:z="urn:import:com.zimfly.filebox.client"
    >
    <ui:style>
            .mainPanel {
                    background-image: url("images/bg.jpg");
                    background-repeat:repeat-x;
            }
    </ui:style>


    <g:ScrollPanel styleName="{style.mainPanel}">

            <g:HTMLPanel>

                    <br></br>

                    <g:VerticalPanel>
                            <g:HorizontalPanel>
                                    <g:HTML>&nbsp;&nbsp;</g:HTML>
                                    <g:Button ui:field="btnToggleUpload">Show Upload Form</g:Button>
                                    <g:HTML>&nbsp;&nbsp;</g:HTML>
                                    <g:Button ui:field='btnNewFolder'>New Folder</g:Button>
                            </g:HorizontalPanel>


                    </g:VerticalPanel>

                    <br></br>

                    <g:SplitLayoutPanel>    
                            <g:west size="300" unit='EM'>   
                                    <z:FilesTree ui:field="filesTree" />
                          开发者_如何学运维  </g:west>
                            <g:center>
                                    <z:FilesGrid ui:field="filesGrid" />
                            </g:center>
                    </g:SplitLayoutPanel>
            </g:HTMLPanel>
    </g:ScrollPanel>
</ui:UiBinder>


First, check that the DOCTYPE declaration on your host page instructs the browsers to use standards mode.

EDIT: looks like the SplitLayoutPanel in your case needs a defined height value.

<!DOCTYPE html>

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号