Set a "Height" on the TabLayoutPanel. (100%, or 300px should do)

If you take a close look at the impl. and the default styles, the
parent TabLayoutPanel drops down at least 3 children div's with
absolute positioning. In fact, you will have to make some overhauls to
get this control to expand with the content... otherwise, you are
going to be jacked by setting the height explicitly.

We had to override the default panel styles and use JQuery to toggle
the position of child 2 > below the TabLayoutPanel root from absolute
to relative. This left the header bar absolute, and the children
relative. This, in affect, makes the panel useful after setting the
height inline.

Good luck!

On Dec 13, 3:16 pm, demosten <[email protected]> wrote:
> Hi,
>
> I cannot make TabLayoutPanel work with UiBinder. I've tested it with
> both Chrome and IE8 and it doesn't show. I made a simple sample using
> the following UiBinder XML:
> (taken from TabLayoutPanel javadocs help)
>
> ------------------------
> <!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">
>
>           <g:TabLayoutPanel barUnit='PX' barHeight='3'>
>           <g:tab>
>             <g:header size='7'><b>HTML</b> header</g:header>
>             <g:Label>able</g:Label>
>           </g:tab>
>           <g:tab>
>             <g:customHeader size='7'>
>               <g:Label>Custom header</g:Label>
>             </g:customHeader>
>             <g:Label>baker</g:Label>
>           </g:tab>
>          </g:TabLayoutPanel>
>
> </ui:UiBinder>
>
> ------------------------
> and my class code:
> ------------------------
> package com.demosten.uitest.client;
>
> import com.google.gwt.core.client.EntryPoint;
> import com.google.gwt.core.client.GWT;
> import com.google.gwt.uibinder.client.UiBinder;
> import com.google.gwt.user.client.Window;
> import com.google.gwt.user.client.ui.RootLayoutPanel;
> import com.google.gwt.user.client.ui.TabLayoutPanel;
>
> public class Test1 implements EntryPoint
> {
>         interface Test1UiBinder extends UiBinder<TabLayoutPanel, Test1> { }
>         private static final Test1UiBinder uiBinder = GWT.create
> (Test1UiBinder.class);
>
>         public void onModuleLoad()
>         {
>                 TabLayoutPanel outer = uiBinder.createAndBindUi(this);
>
>             RootLayoutPanel root = RootLayoutPanel.get();
>             root.add(outer);
>         }}
>
> ------------------------
> Am I missing something? Please help!
>
> Regards,
> demosten

--

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


Reply via email to