Great suggestion, but unfortunately it didn't help.  The item I add to
the deck is still hidden.

Thanks though.

Robert

On Tue, Mar 3, 2009 at 5:01 PM, Ian Bambury <ianbamb...@gmail.com> wrote:
> Try adding the deck to the rootpanel before you add the widget to it.
> I'm not saying this is definitely it, but as a general rule, I try to build
> up widgets as I nest them, from the outside in, adding them to the DOM as
> soon as possible.
> The reason being that if it is not connected, then 100% of 0 is 0. Hence
> height = 0.
> The deckpanel (last time I looked) sizes the deck innards to 100%. The
> SimplePanel doesn't.
>
>
> Ian
>
> http://examples.roughian.com
>
>
> 2009/3/4 Robert J. Carr <rjc...@gmail.com>
>>
>> Hi Ian ... thanks for the response.
>>
>> Let me put it in code then:
>>
>> Widget w = new MyCompilicatedWidget();
>>
>> DeckPanel deck = new DeckPanel();
>> deck.add(w);
>> deck.showWidget(0);
>>
>> RootPanel.get("main").add(deck);
>>
>> // This doesn't work ... shows up as a single black line, however:
>>
>> Widget w = new MyCompilicatedWidget();
>> SimplePanel simple = new SimplePanel();
>> simple.setWidget(w);
>> RootPanel.get("main").add(s);
>>
>> // Works fine, or even:
>>
>> RootPanel.get("main").add(new MyCompilicatedWidget());
>>
>> // End code
>>
>> Assuming I have no styles applied to my DeckPanel (which I don't), I
>> don't see how this can be a CSS issue.  Thanks for the suggestion
>> though, I'll dig a little deeper.
>>
>> Also, not surprising, the same behavior happens for a TabPanel, which
>> makes sense because it uses a DeckPanel.
>>
>> On Tue, Mar 3, 2009 at 4:31 PM, Ian Bambury <ianbamb...@gmail.com> wrote:
>> > My approach would be to add a border to the various widget one at a time
>> > (1px dotted red, say) to find out which widget is not displaying
>> > correctly.
>> > The chances are that you need a height:100% somewhere or that you don't
>> > have
>> > an absolute height in the chain back to the body element.
>> > Without any code, it's not easy to be more specific (for me, anyway)
>> >
>> > Ian
>> >
>> > http://examples.roughian.com
>> >
>> >
>> > 2009/3/4 rjcarr <rjc...@gmail.com>
>> >>
>> >> I have a complicated widget that I'm trying to add to a DeckPanel.
>> >> When the DeckPanel is rendered the widget is not shown, there's just a
>> >> thin line a pixel or two high of where it is supposed to be.  Other
>> >> widgets added to the deck are displayed fine.
>> >>
>> >> Taking away the deck the widget displays normally.  I've been using
>> >> gwt for quite a while now and I've never seen this.  There are no
>> >> errors of any sort ... it just isn't shown.
>> >>
>> >> However, if I add my widget to a SimplePanel it works fine.  My
>> >> temporary solution is to replace the DeckPanel with a SimplePanel and
>> >> use the setWidget() method with a listner, but I'd prefer to use the
>> >> DeckPanel.
>> >>
>> >> Is there any explanation for this?
>> >>
>> >>
>> >
>> >
>> > >
>> >
>>
>>
>
>
> >
>

--~--~---------~--~----~------------~-------~--~----~
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-Web-Toolkit@googlegroups.com
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to