TabularAdapter with context menu

9 views
Skip to first unread message

rubbers...@gmail.com

unread,
Jul 13, 2021, 2:17:59 PM7/13/21
to Enthought Tool Suite users
I am looking to add some simple right-click functionality to a TabularAdapter/TabularEditor object in a traitsui gui.  I have written a basic demo where I would like to call the gui method remove_selected when the remove_selected_action is selected in the context menu.  I've demonstrated the functionality with a button, but I would like to replace it with the context menu.  I was able to get the context menu to show up properly when right-clicking a cell, but I am making a mistake on how to define the action method, because nothing happens when the action is selected. While the demo simply has one action, I'd like to add a variety of actions, all of which could be defined as methods in the main gui.  I couldn't find any examples of adding a simple context menu like this to a TabularAdapter instance.

Thanks for any help!

Josh
tabular_adapter_context_menu.py
Reply all
Reply to author
Forward
0 new messages