Win a copy of Zero to AI - A non-technical, hype-free guide to prospering in the AI era this week in the Artificial Intelligence and Machine Learning forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Paul Clapham
  • Bear Bibeault
  • Jeanne Boyarsky
Sheriffs:
  • Ron McLeod
  • Tim Cooke
  • Devaka Cooray
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Jj Roberts
  • Stephan van Hulst
  • Carey Brown
Bartenders:
  • salvin francis
  • Scott Selikoff
  • fred rosenberger

GWT:Unable to detect right clicks on customized tab panel.

 
Greenhorn
Posts: 23
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all,

I am working on a customized tab panel widget which is extending the
TabPanel class in Google Web Toolkit. One of the requirements is that right clicks on the
tabs should be detected so that i could display my own customized
context menu. But, i am not able to detect the right clicks on the tab
panels. Heres a summary of the steps i have taken:


1. In the default constructor for the TabPanelModified class, I am
sinking the "on mouse down" event using
this.sinkEvents(Event.ONMOUSEDOWN).
2. I have also disabled the default context menu provided by the
browser using the method "disableContextMenu", in the default
constructor itself. The definition for this particular method is as
follows:


public static native void disableContextMenu(Element e) /*-{
e.oncontextmenu = function() { return false; };
}-*/;


3. I have then overridden the method "onBrowserEvent" which is used
for detecting Event.ONMOUSEDOWN and Event.BUTTON_RIGHT. Once they get
detected, I am trying to display the customized context menu.


I would be obliged if anyone here can point out the mistake in the
above steps. I would also like to know if there is any other way to do
the same task.
 
Pradeep Mudaliar
Greenhorn
Posts: 23
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Is there no one here with a solution or have I posted the query in a wrong section?
 
Marshal
Posts: 67463
173
Mac Mac OS X IntelliJ IDE jQuery Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I do not believe that there are many fans of GWT that regularly visit this forum.
 
clojure forum advocate
Posts: 3479
Mac Objective C Clojure
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I suggest you participate in GWT official group, the people there are so helpful and experts.
http://groups.google.com/group/Google-Web-Toolkit
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic