Hi Guys

I'm trying to build my own custom widget. How can i add event handling
to the widget?

Here's there idea...

I have a Composite (my View), on which I add a Timeline Widget
The Timeline widget has many bands TimeBand
and each TimeBand has many TimeEvents.

I've used the DOM.createDiv(), and then GwtExt to have full control
over setting styles on elements. I need to do this (I think, but I'd
love to proven wrong), cos each of my events (individual divs) needs
to be carefully positioned on a scrollable div, and so on...

Anyway, I've kind of got the layout working to a certain degree. What
I'm not sure if how to get the Mouse event handlers firing and
captured so that i can dynamically do stuff to my widget...

so for example:

class Timeline extends Widget {
        Element t;

        Timeline() {
           t = DOM.createDiv();
        }


        public void addTimeBand(TimeBand band) {
            t.append(band.getDiv());
        }
}

class TimeBand {
        ELement band;
        TimeBand() {
                band = DOM.createDiv();
        }

        public Element getDiv() {
                return band;
        }
}



I've tried a number of different things to get the event handlers
working but I can't seem to add events to my TimeBand
All I want to do is track mouse clicks and mouse movements.

Cheers
Chris

--

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