Re: DeckPanel causes Widget to disappear

2009-03-04 Thread Joe Cole
Arrgh. I thought I was using DeckPanel yesterday and was using StackPanel. The easiest way to debug it will be using firebug. Check to see it's structue after loading - i.e. is the widget a child? Sorry about that! Joe On Mar 4, 8:30 pm, Robert J. Carr rjc...@gmail.com wrote: Hi Joe- What API

DeckPanel causes Widget to disappear

2009-03-03 Thread rjcarr
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

Re: DeckPanel causes Widget to disappear

2009-03-03 Thread Robert J. Carr
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

Re: DeckPanel causes Widget to disappear

2009-03-03 Thread Ian Bambury
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

Re: DeckPanel causes Widget to disappear

2009-03-03 Thread Robert J. Carr
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

Re: DeckPanel causes Widget to disappear

2009-03-03 Thread Ian Bambury
Do you have a (non-)working example you could post (or send privately)? Ian http://examples.roughian.com 2009/3/4 Robert J. Carr rjc...@gmail.com 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

Re: DeckPanel causes Widget to disappear

2009-03-03 Thread Joe Cole
I think the problem may be that you are not using the deckpanel add methods: DeckPanel.add(String text, Widget widget, boolean asHTML) Can you try that? On Mar 4, 1:44 pm, Robert J. Carr rjc...@gmail.com wrote: Hi Ian ... thanks for the response. Let me put it in code then: Widget w = new

Re: DeckPanel causes Widget to disappear

2009-03-03 Thread Robert J. Carr
Hi Joe- What API are you looking at? I only see one DeckPanel.add() method: void add(Widget w) Adds the specified widget to the deck. I've checked both 1.5.2 and 1.5.3. There's an inherited add() method, but it still doesn't match your signature. Are you thinking of TabPanel? On Tue,