DecoratorPanel with a ScrollPanel

90 views
Skip to first unread message

huherto

unread,
Jan 4, 2010, 6:44:51 PM1/4/10
to Google Web Toolkit
I've spend a few days working on this. Some panels don't seem to work
fine toghether.

<g:DockLayoutPanel unit='EM'>
<g:north size='4'>
<g:FlowPanel>
<g:Label ui:field="journalLabel"></g:Label>
<g:Button ui:field="newEntryButton">New Entry</g:Button>
<g:Button ui:field="refreshButton">Refresh</g:Button>
<g:TextBox ui:field="searchString"></g:TextBox>
<g:Button ui:field="searchButton">Search</g:Button>
</g:FlowPanel>
</g:north>
<g:center>
<g:ScrollPanel height="100%">
<my:EntryScrollTable ui:field="entriesTable" width="100%" >
</my:EntryScrollTable>
</g:ScrollPanel>
</g:center>
</g:DockLayoutPanel>

Doesn't work if I surround it with a DecoratorPanel. It only shows an
horizontal line instead of a box.

This simpler case:
<g:DecoratorPanel>
<g:ScrollPanel height="100%">
<my:EntryScrollTable ui:field="entriesTable" width="100%" >
</my:EntryScrollTable>
</g:ScrollPanel>
<g:/DecoratorPanel>
Doesn't show the scroll bars when the window is resized.


I had to add this. To make it work at all.

@external middleCenter, gwt-DecoratorPanel, middle;

table.gwt-DecoratorPanel {
margin: 6px;
}
tr.middle {
height: 100%;
vertical-align: top;
}
td.middleCenter {
width: 100%;
}

But still it doesn't work with the ScrollPanel and the FixedWidthGrid
inside. Any suggestions?

huherto

unread,
Jan 5, 2010, 12:00:12 PM1/5/10
to Google Web Toolkit
Rephrasing the question.

The DecoratorPanel uses a table to draw it. The content of the
DecoratorPanel is inside of the central <td> cell. That cell must have
some formating property that prevents the scrolling from working. It
must be something affecting the height because the overall height
seems to be 0.

So what can cause the height of a table to be 0? Even if the contents
of one cell have a height clearly > 0.

Reply all
Reply to author
Forward
0 new messages