]> git.saurik.com Git - wxWidgets.git/commitdiff
fix for root behavior under MSW
authorVáclav Slavík <vslavik@fastmail.fm>
Sat, 5 Jan 2002 23:26:51 +0000 (23:26 +0000)
committerVáclav Slavík <vslavik@fastmail.fm>
Sat, 5 Jan 2002 23:26:51 +0000 (23:26 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@13397 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/html/helpfrm.cpp

index e188cb800ddad2bda60a855883475e8b9d9ab93c..d317e2a5b738f6242e026925188e72e401107967 100644 (file)
@@ -304,6 +304,11 @@ bool wxHtmlHelpFrame::Create(wxWindow* parent, wxWindowID id,
     if (style & wxHF_CONTENTS)
     {
         wxWindow *dummy = new wxPanel(m_NavigPan, wxID_HTML_INDEXPAGE);
+        
+        long treeStyle = wxSUNKEN_BORDER | wxTR_HAS_BUTTONS;
+        #ifndef __WXMSW__ // FIXME - temporary, till MSW supports wxTR_HIDE_ROOT
+        treeStyle |= wxTR_HIDE_ROOT;
+        #endif
 
         if (style & wxHF_BOOKMARKS)
         {
@@ -347,9 +352,8 @@ bool wxHtmlHelpFrame::Create(wxWindow* parent, wxWindowID id,
 
             wxLayoutConstraints *b4 = new wxLayoutConstraints;
             m_ContentsBox = new wxTreeCtrl(dummy, wxID_HTML_TREECTRL,
-                                           wxDefaultPosition, wxDefaultSize, 
-                                           wxSUNKEN_BORDER | 
-                                           wxTR_HAS_BUTTONS | wxTR_HIDE_ROOT);
+                                           wxDefaultPosition, wxDefaultSize,
+                                           treeStyle);
             m_ContentsBox->AssignImageList(ContentsImageList);
 
             b4->top.Below (m_Bookmarks, 10);
@@ -368,7 +372,7 @@ bool wxHtmlHelpFrame::Create(wxWindow* parent, wxWindowID id,
         {
             m_ContentsBox = new wxTreeCtrl(m_NavigPan, wxID_HTML_TREECTRL,
                                            wxDefaultPosition, wxDefaultSize,
-                                           wxTR_HIDE_ROOT | wxTR_HAS_BUTTONS | wxSUNKEN_BORDER);
+                                           treeStyle);
             m_ContentsBox->AssignImageList(ContentsImageList);
             m_NavigPan->AddPage(m_ContentsBox, _("Contents"));
         }