# HG changeset patch # User laurent # Date 1318327735 -7200 # Node ID 8c525217ef1fac0c18b1dca2ca6d15f4e8b25ccd # Parent 0a6b2e1f8ce3e07a98407d65a79de8b849f2e654 Fix bug with usage of CustomTreeCtrl method unavailable on wx older versions diff -r 0a6b2e1f8ce3 -r 8c525217ef1f SearchResultPanel.py --- a/SearchResultPanel.py Tue Oct 11 12:07:04 2011 +0200 +++ b/SearchResultPanel.py Tue Oct 11 12:08:55 2011 +0200 @@ -86,11 +86,13 @@ self.HeaderLabel = wx.StaticText(id=ID_SEARCHRESULTPANELHEADERLABEL, name='HeaderLabel', parent=self, pos=wx.Point(0, 0), size=wx.Size(0, 17), style=0) - + + search_results_tree_style = CT.TR_HAS_BUTTONS|CT.TR_NO_LINES|CT.TR_HAS_VARIABLE_ROW_HEIGHT self.SearchResultsTree = CT.CustomTreeCtrl(id=ID_SEARCHRESULTPANELSEARCHRESULTSTREE, name="SearchResultsTree", parent=self, - pos=wx.Point(0, 0), style=0) - self.SearchResultsTree.SetAGWWindowStyleFlag(CT.TR_HAS_BUTTONS|CT.TR_NO_LINES|CT.TR_HAS_VARIABLE_ROW_HEIGHT) + pos=wx.Point(0, 0), style=search_results_tree_style) + if wx.VERSION >= (2, 8, 11): + self.SearchResultsTree.SetAGWWindowStyleFlag(search_results_tree_style) self.Bind(wx.EVT_TREE_ITEM_ACTIVATED, self.OnSearchResultsTreeItemActivated, id=ID_SEARCHRESULTPANELSEARCHRESULTSTREE)