Is it possible in MATLAB App Designer's UITable component to retrieve the row and column indices of the cell under the mouse pointer on right-click

Currently, in MATLAB App Designer, the UITable component does not provide a standard mechanism to retrieve the row and column indices of the cell under the mouse pointer when the user right-clicks on the table. Additionally, there is no built-in support for displaying context menus that differ by column based on the cell under the mouse at the time of the right-click.

 Accepted Answer

Starting with MATLAB R2023b, the ContextMenuOpeningFcn callback includes enhanced event data that gives more detailed information about the component that was right-clicked. For the UITable component, this means you can now determine exactly which row, column, or cell triggered the context menu. With this information, you can programmatically adjust the contents of the context menu to fit the specific cell or column the user interacted with. You can find more details about this event data in the official documentation.
Please note that this capability requires MATLAB R2023b or later. To display different context menus depending on the row or column, you will need to update your menu dynamically using the InteractionInformation provided in the event data.

More Answers (0)

Categories

Find more on Develop Apps Using App Designer in Help Center and File Exchange

Tags

No tags entered yet.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!