PDA

View Full Version : text and onclick event



soma13
18 Feb 2012, 9:22 AM
Hi all,

I have made a notification bar (simple div element with css on my main html page) on the right side on my page (see the attached image).
There are some text on it and there is a event counter text too (big green digit). I need to handle onClick event when user click on the big green text: after user click on the big text or somewhere in my notification bar I want to show an simple panel with widgets.

So, how can I attach a simple onClick event to text widget?

I do not want to use button widget because it has borders and etc. It is not too nice on my notification bar.

Please help me.

Thx

soma13
19 Feb 2012, 1:19 PM
Hi All,

I solved my problem.
I use com.google.gwt.user.client.ui.Anchor widget instead of com.extjs.gxt.... Text or Label.

Anchor widget has a addClickHandler method.

numberOfNotificationAnchor.addClickHandler( new ClickHandler()
{
@Override
public void onClick(ClickEvent event)
{
Info.display("event", "onClick");
}
});