PDA

View Full Version : Listener on LayoutContainer



rian.k
4 May 2009, 6:58 AM
Hi,

I'm trying to add a listener to a LayoutContainer holding some Panels,
so I can switch the selected Panel on clicks. However, with the following
code I get zero events:


container.addListener(Events.OnClick, new Listener<BaseEvent>() {
public void handleEvent(BaseEvent be) {
selected = (LayoutContainer) be.getSource();
}
});Where am I wrong?
thanks

sven
4 May 2009, 6:59 AM
You need to sink the event.

rian.k
4 May 2009, 7:00 AM
wow, that was fast :)
thanks sven

rian.k
4 May 2009, 7:33 AM
I guess I'm doing something wrong.. when I sink the events,
the event source is always the underlying LayoutContainer.
How could I get the right source Panel? thx