On Mon, 2012-06-18 at 14:44 -0700, Daniel Gonzalez wrote:
> Hi,
> 
> 
> I am trying to define my first simple widget, but I am not
> suceeding.What I am trying to define is a widget for a Label/Value
> pair. Label and Value must have configurable style names, so that text
> size, color, etc can be defined independently in the CSS. And they
> must be horizontally next to each other, with label placed before
> value.
> 
> 
> I have tried several implementation without success. It is not clear
> for me from which base class I should derive my widget. Directly from
> Widget? My first idea was to use two different DIVs, one for label and
> one for value, but I do not know how to add two DOM elements to a
> widget.

The base widget for a custom widget is usually ComplexPanel. It has the
methods and infrastructure for managing (adding and removing) child DOM
elements. You still have to use DOM methods, but despite the name, it
removes some of the complexities. Grep through the ui folder for
examples of how ComplexPanel is used.

- Jim Washington





Reply via email to