Thanks Thomas.

I looked at SimplePanel and realized that I could created a subclass
of SimplePanel with a constructor that takes an element (in my case a
<FIELDSET> element).

<code>
class Fielset extends SimplePanel {
        public Fielset(Element fieldset, Widget w) {
            super(fieldset);
            add(w);
        }
    }
</code>

Now when I add the above FieldSet widget to the rootpanel it still
does not recognize the events encapsulated in the widget passed as
parameter.

<code>
 final Button b = new Button("Button 7");
        b.addClickHandler(new ClickHandler() {
            public void onClick(ClickEvent e) {
                Window.alert("Clicked " + b.getText());
            }
        });
        Element fset = DOM.createFieldSet();
        Element leg = DOM.createLegend();
        leg.setInnerText("Options");
        fset.appendChild(leg);
        t.setWidget(0, 0, new Fielset(fset, b));
        RootPanel.get().add(t);
</code>


Shouldn't this just work?




--~--~---------~--~----~------------~-------~--~----~
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