]> git.saurik.com Git - wxWidgets.git/commitdiff
*DO* use wxTR_EDIT_LABELS, it is neccessary
authorVáclav Slavík <vslavik@fastmail.fm>
Sun, 7 Apr 2002 16:05:46 +0000 (16:05 +0000)
committerVáclav Slavík <vslavik@fastmail.fm>
Sun, 7 Apr 2002 16:05:46 +0000 (16:05 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@14988 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/generic/dirctrlg.cpp

index 6d7b7c2158381ccc847b38c71cfb6c75754a8751..dddbbad58759a6f3897e339740fab024a866fe97 100644 (file)
@@ -505,9 +505,16 @@ bool wxGenericDirCtrl::Create(wxWindow *parent,
 
     Init();
 
-    long treeStyle = wxTR_HAS_BUTTONS ; // | wxTR_EDIT_LABELS ;
-
+    long treeStyle = wxTR_HAS_BUTTONS;
+#ifdef __WXMSW__
+    // VS: Do **NOT** remove this style, ever. MSW native wxTreeCtrl::EditLabel doesn't 
+    //     work without this style and we need it to be able to create new directories.
+    //     Generic wxTreeCtrl can do it even w/o wxTR_EDIT_LABELS, so we only add it
+    //     in case of wxMSW (as it is arguably better to not have the style enabled)
+    treeStyle |= wxTR_EDIT_LABELS;
+#endif
 #ifndef __WXMSW__
+    // FIXME, doesn't work for some reason
     treeStyle |= wxTR_HIDE_ROOT;
 #endif