menuItem =new wxMenu;
wxMenuItem* m1Item=menuItem->Append(wxID_ANY, _T("&Anonymize"));
wxMenuItem* m2Item=menuItem->Append(wxID_ANY, _T("&Local Copy"));
- wxMenuItem* m3Item=menuItem->Append(wxID_ANY, _T("&Edit field"));
+ wxMenuItem* m3Item=menuItem->Append(wxID_ANY, _T("&Edit Fields"));
mAnonymizingID=m1Item->GetId();
mLocalCopyID=m2Item->GetId();
}
+ //================================================================
+ //================================================================
+
void WxTreeView::OnItemMenu(wxListEvent &event)
{
wxPoint clientpt;
if ( GetCtrl(level) == senderCtrl ) break;
}
long* ptr=0;
- int flag=wxLIST_HITTEST_ONITEM;
- long itemId=GetCtrl(level)->HitTest(clientpt,flag,ptr);
- std::cout<<itemId<<std::endl;
+ int flag;
+ long itemId=GetCtrl(level)->HitTest(wxPoint(clientpt.x,clientpt.y-8),flag,ptr);
+ tree::Node* node=((ItemData*)GetCtrl(level)->GetItemData(itemId))->node;
+ std::cout<<node->GetLabel()<<std::endl;
PopupMenu(menuItem, clientpt);
}