" "};
-#define wxID_TREECTRL 7000
-#define wxID_FILTERLISTCTRL 7001
-
#if defined(__DOS__)
bool wxIsDriveAvailable(const wxString& dirName)
Init();
- long treeStyle = wxTR_HAS_BUTTONS | wxTR_EDIT_LABELS | wxTR_HIDE_ROOT;
+ long treeStyle = wxTR_HAS_BUTTONS;
+
+ if (style & wxDIRCTRL_EDITABLE)
+ treeStyle |= wxTR_EDIT_LABELS;
+
+#ifndef __WXMSW__
+ // FIXME, doesn't work for some reason
+ treeStyle |= wxTR_HIDE_ROOT;
+#endif
+
if ((style & wxDIRCTRL_3D_INTERNAL) == 0)
treeStyle |= wxNO_BORDER;
{
m_showHidden = show;
- // reparse FIXME
+ wxString path = GetPath();
+ m_treeCtrl->Collapse(m_treeCtrl->GetRootItem());
+ m_treeCtrl->Expand(m_treeCtrl->GetRootItem());
+ SetPath(path);
}
void wxGenericDirCtrl::AddSection(const wxString& path, const wxString& name, int imageId)
wxSize filterSz ;
if (m_filterListCtrl)
{
+#ifdef __WXMSW__
+ // For some reason, this is required in order for the
+ // correct control height to always be returned, rather
+ // than the drop-down list height which is sometimes returned.
+ wxSize oldSize = m_filterListCtrl->GetSize();
+ m_filterListCtrl->SetSize(-1, -1, oldSize.x+10, -1, wxSIZE_USE_EXISTING);
+ m_filterListCtrl->SetSize(-1, -1, oldSize.x, -1, wxSIZE_USE_EXISTING);
+#endif
filterSz = m_filterListCtrl->GetSize();
sz.y -= (filterSz.y + verticalSpacing);
}