Hi all,

I have a problem with context menus, I've a file browser like app, it shows
a set of files as atoms and you can navigate through folders.

I've captured the 'contextmenu' event of every atom, and when it's fired I
execute .prepareContextMenu() method who will show/exclude menu items
depending on a set of states.

It works all right, but sometimes due to the configuration I don't want to
show any item so the context menu is displayed as a one-pixel box with
shadow. This is horrible so I want to not show the menu if there are no
items to display. I tried with event.preventDefault() but it didn't work,
the context menu is still there. So I thought than if I remove the context
menu from the atom on the "contextMenu" event "atom.setContextMenu(null)"
it will not show any context but this does not work, it shows the menu it
had before the event was fired.

Then I captured "beforeContextmenuOpen" instead of "contextMenu" event, but
it was worse, "beforeContextmenuOpen" is not fired once I setted the
contextMenu property to null and it didn't work either. And at last I tried
with "click" event but the same problem happens.

So I'm desperated isn't any way to disable the context menu of a widget on
the fly? that is, when the contextMenu event is fired?

Thanks

---
A. Matías Quezada
amati...@gmail.com
------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
qooxdoo-devel mailing list
qooxdoo-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel

Reply via email to