wxTreeEvent, Connect
Torsten Mohr
tmohr at s.netic.de
Sat Sep 1 05:06:03 PDT 2007
Hi,
in a class derived from wxDialog i use a wxSplitterWindow and in
that one i use a wxTreeCtrl.
I'd like to get the events for a selection-change in my dialog class
and i try to use Connect for that:
In the constructor of the wxDialog:
split = new wxSplitterWindow(this, CHR_SETTINGS_SPLIT,
wxDefaultPosition, wxDefaultSize);
stree = new wxTreeCtrl(split, CHR_SETTINGS_TREE,
wxDefaultPosition, wxDefaultSize,
wxTR_HAS_BUTTONS | wxTR_HIDE_ROOT | wxTR_SINGLE );
Connect(wxEVT_COMMAND_TREE_SEL_CHANGED,
wxTreeEventHandler(ChrXmlSettings::OnSelChanged));
void ChrXmlSettings::OnSelChanged(wxTreeEvent& e)
{
}
When linking i get unresolved symbols for:
ChrXmlSettings::GetEventHashTable
ChrXmlSettings::GetEventTable
Those are virtual methods of the wxEvtHandler and wxDialog is
derived from it.
Should i implement those methods? What should be in there?
Is there a way around that?
Is there a better way to get notified of a selection change of
the wxTreeCtrl? I don't really want to create a new class.
Of course i know the example in the documentation and the Wiki,
but they don't help here. Also the book did not really help.
Thanks for any hints,
Torsten.
More information about the wx-users
mailing list