Menu

#142 [wxTreeListCtrl] Context menu event is item missing

Subversion_TRUNK
pending-works-for-me
5
2012-05-01
2012-04-28
T. Modes
No

wxEVT_COMMAND_TREE_ITEM_MENU event does not report the item, on which the mouse click happened. So it is not possible to get different context menu for different items in the tree.
The fix is easy: in src/treelistctrl.cpp: change line 4320: SendEvent(wxEVT_COMMAND_TREE_ITEM_MENU, 0, &nevent);
to SendEvent(wxEVT_COMMAND_TREE_ITEM_MENU, item, &nevent);

Discussion

  • Ronan Chartois

    Ronan Chartois - 2012-05-01

    Thank you for the report.
    I see no reason why the item information should not be included --and indeed an easy fix!

     
  • Ronan Chartois

    Ronan Chartois - 2012-05-01
    • status: open --> pending-works-for-me
     

Log in to post a comment.