Project

General

Profile

MPRight-Click Context Menus in Table View

Added by Mark Petryk over 4 years ago

I found that if I wanted right-click functionality in a Table-View, that i needed to apply some attributes. I don't know if this is the 'correct' method of enabling right-click, but it's working for me. Figured it might be worth sharing here;

1403   /*·
1404   ** To support right-click, we need to disable the built-in browser·
1405   **  context menu.·
1406   **·
1407   ** Note that disabling the context menu and catching the·
1408   **  right-click does not work reliably on all browsers.·
1409   */·
1410 #ifdef NEVER·
1411   m_tableView.setAttributeValue·
1412   (·
1413     "oncontextmenu",·
1414     "event.cancelBubble = true; event.returnValue = false; return false;"·
1415   );·
1416 #endif·
1417 ·

Replies (3)

MP RE: Right-Click Context Menus in Table View - Added by Mark Petryk over 4 years ago

(don't know why redmine butchered my paste...)

MT RE: Right-Click Context Menus in Table View - Added by Mark Travis over 4 years ago

In the editor, before you paste your code, click on the "<>" button and choose the desired language. Then hit "Preview" to make sure the formatting comes through.

    (1-3/3)