Thanks for your help, but for some reason my UIBinder is not binding the panel to the style part. I'm really running out of ideas, so in case any of you see where I'm wrong, it'll help me a lot. Otherwise I'll have to change my design to not have tabs nested with the forms.
My ui.xml file: <!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'> <ui:style> .gwt-TabLayoutPanelTab { color: white; } </ui:style> <g:TabLayoutPanel barHeight='100'> <g:tab> <g:header>Tab 1</g:header> <g:Label>Test 1</g:Label> </g:tab> <g:tab> <g:header>Tab 2</g:header> <g:Label>Test 2</g:Label> </g:tab> </g:TabLayoutPanel> </ui:UiBinder> And my .java file that binds to it: public class MyTabListView extends Composite { interface Binder extends UiBinder<Widget, MyTabListView> {} private static final Binder BINDER = GWT.create(Binder.class); private static MyTabListView instance; public static MyTabListView instance() { if (instance == null) { instance = new MyTabListView(); } return instance; } public MyTabListView() { initWidget(BINDER.createAndBindUi(this)); } } Thanks On Thu, Dec 16, 2010 at 4:03 PM, John LaBanca <[email protected]> wrote: > You have to reference the style like this: > > addStyleNames='{style.mycssstyle}' > > Thanks, > John LaBanca > [email protected] > > > > On Thu, Dec 16, 2010 at 12:32 PM, Aldo Neto <[email protected]> wrote: > >> Hi Subhro, >> >> Thanks once again. >> >> You are right...I have to set the height/width to get the content to be >> displayed. However, for some reason, I'm not being able to do that. >> >> My UIBinder is the following: >> >> <g:TabLayoutPanel ui:field='rightTabPanel' barUnit='PX' >> barHeight='200'> >> <g:tab addStyleNames='mycssstyle' width='100px' height='100px'> >> <g:header>Tab 1</g:header> >> <g:Label>Test 1</g:Label> >> </g:tab> >> <g:tab> >> <g:header>Tab 2</g:header> >> <g:Label>Test 2</g:Label> >> </g:tab> >> </g:TabLayoutPanel> >> >> As you can see, I started with a very simple TabLayoutPanel. In my >> "ui:style" part I have: >> >> <ui:style> >> (...) >> .mycssstyle { >> width: 100px; >> height: 100px; >> } >> </ui:style> >> >> I checked on firebug and I see that the class name is not even set. I >> really have no idea what is going on. >> >> Do you see any missing part? >> >> Thanks again for your help. >> >> >> On Thu, Dec 16, 2010 at 10:13 AM, Subhrajyoti Moitra < >> [email protected]> wrote: >> >>> either should work. >>> I set in the UIBinder xml the height and width attributes for the >>> TabLayoutPanel widget. >>> <g:TabLayoutPanel barHeight="30" width="100%" height="100%"/> >>> >>> U can also use CSS. Define the height/widths in the CSS selector and then >>> do a addStyleNames="mycssstyle" in the uibinder XML >>> >>> Also u can do the same programatically, setWidth and setHeight or >>> addStyleNames method in the TabLayoutPanel widget. >>> >>> Thanks, >>> Subhro. >>> >>> >>> On Thu, Dec 16, 2010 at 4:26 PM, Aldo Neto <[email protected]> wrote: >>> >>>> Thanks for your reply. >>>> >>>> Do you mean setting them on the TabLayoutPanel XML declaration or via >>>> CSS? If CSS, what classes did you use to set them? >>>> >>>> Thanks, >>>> Aldo >>>> >>>> >>>> On Thu, Dec 16, 2010 at 8:04 AM, Subhrajyoti Moitra < >>>> [email protected]> wrote: >>>> >>>>> Try setting Width/Height of the TabLayoutPanel widget to 100%. >>>>> I had a similar problem, and explicitly setting the height and width >>>>> solved it. Not sure if this would help you. >>>>> >>>>> Thanks, >>>>> Subhro. >>>>> >>>>> On Thu, Dec 16, 2010 at 1:12 AM, Aldo Neto <[email protected]> wrote: >>>>> >>>>>> Hi all, >>>>>> >>>>>> I need to create a TabLayoutPanel and insert it as part of my editing >>>>>> page. In other words, I'm filling a given form and as part of that form I >>>>>> need some information to display inside the Tabs. I'm using >>>>>> the DockLayoutPanel to split the screen and as part of the center I have >>>>>> a >>>>>> SimplePanel (along with other panels), which should set my >>>>>> TabLayoutPanel as >>>>>> its widget. Note that the TabLayoutPanel is defined in a different file. >>>>>> >>>>>> I tried many different ways to do that but none is working. With the >>>>>> SimplePanel I can get the Tabs header to be displayed but not their >>>>>> content. >>>>>> >>>>>> Does anybody know what I have to do to fix that? >>>>>> >>>>>> I was able to get the TabLayoutPanel to work inside the "Hello World" >>>>>> layout (as it would be the only Panel in it), but it is not working for a >>>>>> more complex layout. >>>>>> >>>>>> Thanks in advance, >>>>>> >>>>>> -- >>>>>> 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]<google-web-toolkit%[email protected]> >>>>>> . >>>>>> For more options, visit this group at >>>>>> http://groups.google.com/group/google-web-toolkit?hl=en. >>>>>> >>>>> >>>>> -- >>>>> 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]<google-web-toolkit%[email protected]> >>>>> . >>>>> For more options, visit this group at >>>>> http://groups.google.com/group/google-web-toolkit?hl=en. >>>>> >>>> >>>> -- >>>> 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]<google-web-toolkit%[email protected]> >>>> . >>>> For more options, visit this group at >>>> http://groups.google.com/group/google-web-toolkit?hl=en. >>>> >>> >>> -- >>> 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]<google-web-toolkit%[email protected]> >>> . >>> For more options, visit this group at >>> http://groups.google.com/group/google-web-toolkit?hl=en. >>> >> >> -- >> 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]<google-web-toolkit%[email protected]> >> . >> For more options, visit this group at >> http://groups.google.com/group/google-web-toolkit?hl=en. >> > > -- > 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]<google-web-toolkit%[email protected]> > . > For more options, visit this group at > http://groups.google.com/group/google-web-toolkit?hl=en. > -- 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.
