controls/SearchResultPanel.py
changeset 1870 4d070115b552
parent 1847 6198190bc121
child 1881 091005ec69c4
equal deleted inserted replaced
1869:49cdd843c006 1870:4d070115b552
   313             text_ctrl.Bind(wx.EVT_LEFT_DCLICK, self.GetTextCtrlDClickFunction(root))
   313             text_ctrl.Bind(wx.EVT_LEFT_DCLICK, self.GetTextCtrlDClickFunction(root))
   314             text_ctrl.SetInsertionPoint(0)
   314             text_ctrl.SetInsertionPoint(0)
   315             text_ctrl.SetStyle(start_idx, end_idx, style)
   315             text_ctrl.SetStyle(start_idx, end_idx, style)
   316             self.SearchResultsTree.SetItemWindow(root, text_ctrl)
   316             self.SearchResultsTree.SetItemWindow(root, text_ctrl)
   317 
   317 
   318         if wx.VERSION >= (2, 6, 0):
   318         item, root_cookie = self.SearchResultsTree.GetFirstChild(root)
   319             item, root_cookie = self.SearchResultsTree.GetFirstChild(root)
       
   320         else:
       
   321             item, root_cookie = self.SearchResultsTree.GetFirstChild(root, 0)
       
   322         for child in infos["children"]:
   319         for child in infos["children"]:
   323             if item is None:
   320             if item is None:
   324                 item = self.SearchResultsTree.AppendItem(root, "")
   321                 item = self.SearchResultsTree.AppendItem(root, "")
   325                 item, root_cookie = self.SearchResultsTree.GetNextChild(root, root_cookie)
   322                 item, root_cookie = self.SearchResultsTree.GetNextChild(root, root_cookie)
   326             self.GenerateSearchResultsTreeBranch(item, child)
   323             self.GenerateSearchResultsTreeBranch(item, child)