SplitLayoutPanel - initial split between top and bottom panel

47 views
Skip to first unread message

parvez....@gmail.com

unread,
Jun 12, 2010, 5:25:30 PM6/12/10
to Google Web Toolkit
I am trying to use SplitLayoutPanel, everything seems to be working
fine, except that on initial start, center panel (bottom panel) covers
the north panel (top panel) completely.
I have to use split bar to bring it down, I must be missing some
property, any suggestion what should I do so that initially both
panels are split half & half?
Thanks.

Stefan Bachert

unread,
Jun 13, 2010, 11:20:34 AM6/13/10
to Google Web Toolkit
Hi,

you did not supplied code. However, I guess, the panel is initially
smaller then north and center panel together.
To check just use setPixelSize with large values e.g.
setPixelSize(1000, 1000)

I afraid, probably the is no easy way to set half and half.
Because you need to know the total height of the SplitLayoutPanel
which is NOT the sum of both member panels.

Stefan Bachert
http://gwtworld.de


On Jun 12, 11:25 pm, "parvez.chau...@gmail.com"

pac

unread,
Jun 13, 2010, 7:17:21 PM6/13/10
to Google Web Toolkit
Thanks for your reply Stefan.
As such I do not have height for north and center panel, but I did try
a style for both panels and tried to make their size half of split
panel i.e. 300px, but did not work. And half & half I really do not
need, as long as both panels are visible, at the moment center panel
starts from top and so north is not visible at all initially. Below is
rough idea of code what I have at the moment. thanks for your time.

<ui:style>
.splitPnl {
text-align: left;
width: 925px;
height: 600px;
}

.header {
background: #d0e4f6;
}

.table {
table-layout: fixed;
cursor: pointer;
cursor: hand;
width: 100%;
}

.body {
line-height: 150%;
padding: 20px 40px 20px 10px;
font-family: 'Times New Roman', Times, serif;
}

</ui:style>



<g:DecoratorPanel>
<g:SplitLayoutPanel styleName='{style.splitPnl}'>
<g:north size='2'>
<g:DockLayoutPanel unit='EM'>
<g:north size='3'>
<g:FlexTable styleName='{style.header}'
cellSpacing='0' cellPadding='0'>
</g:FlexTable>
</g:north>

<g:center>
<g:ScrollPanel>
<g:FlexTable styleName='{style.table}' cellSpacing='0'
cellPadding='0' />
</g:ScrollPanel>
</g:center>
</g:DockLayoutPanel>
</g:north>

<g:center>
<g:ScrollPanel>
<g:HTML styleName='{style.body}' ui:field='messageBody'
wordWrap='true' />
</g:ScrollPanel>
</g:center>
</g:SplitLayoutPanel>
</g:DecoratorPanel>

On Jun 13, 4:20 pm, Stefan Bachert <stefanbach...@yahoo.de> wrote:
> Hi,
>
> you did not supplied code. However, I guess, the panel is initially
> smaller then north and center panel together.
> To check just use setPixelSize with large values e.g.
> setPixelSize(1000, 1000)
>
> I afraid, probably the is no easy way to set half and half.
> Because you need to know the total height of the SplitLayoutPanel
> which is NOT the sum of both member panels.
>
> Stefan Bacherthttp://gwtworld.de

Chris Boertien

unread,
Jun 13, 2010, 8:23:10 PM6/13/10
to google-we...@googlegroups.com
The size element for SplitLayoutPanel is in PX or pixels. So your
essentially making the north panel 2px in size. According to the
javadoc, this is hardcoded, so you cant specifiy EM or PCT

> --
> You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
> To post to this group, send email to google-we...@googlegroups.com.
> To unsubscribe from this group, send email to google-web-tool...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
>
>

pac

unread,
Jun 14, 2010, 3:34:27 PM6/14/10
to Google Web Toolkit
Thanks for noticing and pointing it out. It worked. thanks again.

On Jun 14, 1:23 am, Chris Boertien <chris.boert...@gmail.com> wrote:
> The size element for SplitLayoutPanel is in PX or pixels. So your
> essentially making the north panel 2px in size. According to the
> javadoc, this is hardcoded, so you cant specifiy EM or PCT
>
Reply all
Reply to author
Forward
0 new messages