BEGIN_EVENT_TABLE(MyFrame,wxFrame)
EVT_TREE_SEL_CHANGED(ID_DIR_CTRL, MyFrame::OnTreeSelChanged)
END_EVENT_TABLE()
One solid solution was pointed by Joseph Blough using a dynamic connection, that is an (more object like) alternative to event tables. I'll check that on a sunnyless Sunday, for now I stick with the old event table setting the wxTreeCtrl ID:
dirCtrl->GetTreeCtrl()->SetId(ID_TREE_CTRL);Documentation says that the identifier should not be modified but, hey, I'm setting it in the constructor. And it works!
Update terça-feira, 17 de Julho de 2007:
No, it does not work. Events are catched, but are also lost by the generic directory tree. Sunnyles Sunday on Tuesday, that is. I could get all tree events with wxID_ANY but I'm seeing some more trees coming...
Sem comentários:
Enviar um comentário