Sorry all,
The message was incomplete.
and i also tried to get the Native Event by the following code
labelObject.addClickHandler(new ClickHandler(){
public void onClick(ClickEvent event) {
if(event.getNativeEvent().getButton()==Event.BUTTON_RIGHT)
{
}
else if (event.getNativeEvent().getButton()==Event.BUTTON_RIGHT)
{
}
So Kindly Help me in solving the above issue
Thanks & Regards,
Ved Prakash Kamishetty
//Code is not even entering into the if bock.
On Apr 1, 7:20 pm, Ved <[email protected]> wrote:
> Hi,
>
> I am trying to catch a Double click event but unable to catch it on a
> Label
>
> i have tried the by adding the following code to my class
>
> final Label la=new Label("New Label");
>
> la.sinkEvents(Event.ONCLICK | Event.ONDBLCLICK |Event.ONKEYDOWN );
>
> la.onBrowserEvent(new Event ()
> {
>
> public void onBrowserEvent(Event e) {
>
> switch (DOM.eventGetType(e)) {
>
> case Event.ONCLICK: {
> System.out.println("IN Click
> Listner");
> break;
> }
> case Event.ONDBLCLICK:{
> System.out.println("In Double
> Click Event");
> break;
> }
> case Event.ONFOCUS:{
> System.out.println("In Double
> Click Event");
> break;
> }
>
> }
>
> }
>
> }
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---