]> git.saurik.com Git - wxWidgets.git/blobdiff - src/generic/dirctrlg.cpp
added a few missing tree events to the docs
[wxWidgets.git] / src / generic / dirctrlg.cpp
index c56008620eb1bc057f89a4031cfa2d1be0de1453..a9a8a03c6b5370767ffb0c73fc8c18f32f59df18 100644 (file)
@@ -505,7 +505,12 @@ bool wxGenericDirCtrl::Create(wxWindow *parent,
 
     Init();
 
-    long treeStyle = wxTR_HAS_BUTTONS | wxTR_EDIT_LABELS | wxTR_HIDE_ROOT;
+    long treeStyle = wxTR_HAS_BUTTONS ; // | wxTR_EDIT_LABELS ;
+
+#ifndef __WXMSW__
+    treeStyle |= wxTR_HIDE_ROOT;
+#endif
+
     if ((style & wxDIRCTRL_3D_INTERNAL) == 0)
         treeStyle |= wxNO_BORDER;
 
@@ -579,7 +584,10 @@ void wxGenericDirCtrl::ShowHidden( bool show )
 {
     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)