// events
// ----------------------------------------------------------------------------
-wxDEFINE_EVENT( wxEVT_COMMAND_DIRCTRL_CHANGED, wxTreeEvent );
+wxDEFINE_EVENT( wxEVT_DIRCTRL_CHANGED, wxTreeEvent );
// ----------------------------------------------------------------------------
// wxGetAvailableDrives, for WINDOWS, DOS, OS2, MAC, UNIX (returns "/")
m_treeCtrl = CreateTreeCtrl(this, wxID_TREECTRL,
wxPoint(0,0), GetClientSize(), treeStyle);
- if (!filter.empty())
+ if (!filter.empty() && (style & wxDIRCTRL_SHOW_FILTERS))
m_filterListCtrl = new wxDirFilterListCtrl(this, wxID_FILTERLISTCTRL);
m_defaultPath = dir;
void wxGenericDirCtrl::OnTreeSelChange(wxTreeEvent &event)
{
- wxTreeEvent changedEvent(wxEVT_COMMAND_DIRCTRL_CHANGED, GetId());
+ wxTreeEvent changedEvent(wxEVT_DIRCTRL_CHANGED, GetId());
changedEvent.SetEventObject(this);
changedEvent.SetItem(event.GetItem());
{
m_filter = filter;
- if (!filter.empty() && !m_filterListCtrl)
+ if (!filter.empty() && !m_filterListCtrl && HasFlag(wxDIRCTRL_SHOW_FILTERS))
m_filterListCtrl = new wxDirFilterListCtrl(this, wxID_FILTERLISTCTRL);
else if (filter.empty() && m_filterListCtrl)
{