This is my code:
Creating controls and Connecting to mouse event.
Code: Select all
ComboControl = new wxComboBox(MainPanel, ID_COMBOCONTROL, wxT(""), wxPoint(10,20), wxSize(200,21), arrayStringFor_ComboControl, wxCB_READONLY, wxDefaultValidator, wxT("ComboControl"));
ComboMenu = new wxMenu(wxT(""));ComboMenu->Append(ID_MNU_RENAME_1010, wxT("Rename"), wxT(""), wxITEM_NORMAL);
ComboMenu->Append(ID_MNU_DELETE_1009, wxT("Delete"), wxT(""), wxITEM_NORMAL);
ComboControl->Connect(wxID_ANY ,wxEVT_RIGHT_UP,wxMouseEventHandler( MercPoolDialog::ComboRightUp ) );
Code: Select all
void MercPoolDialog::ComboRightUp( wxMouseEvent& event ){
ComboControl->PopupMenu( ComboMenu );
event.Skip();
}
Is it posible to make popup manu for combo box?
If so then could You give me any pointers how to do it correctly?