From c4b741b797215410a557a68edacc0e8189669535 Mon Sep 17 00:00:00 2001 From: Robin Dunn Date: Sat, 10 Feb 2018 12:52:23 -0800 Subject: [PATCH] Deprecate wx.ListItemAttr --- demo/ListCtrl_virtual.py | 4 ++-- etg/listctrl.py | 4 ++++ 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/demo/ListCtrl_virtual.py b/demo/ListCtrl_virtual.py index befec43a..c8161c09 100644 --- a/demo/ListCtrl_virtual.py +++ b/demo/ListCtrl_virtual.py @@ -30,10 +30,10 @@ class TestVirtualList(wx.ListCtrl): self.SetItemCount(1000000) - self.attr1 = wx.ListItemAttr() + self.attr1 = wx.ItemAttr() self.attr1.SetBackgroundColour("yellow") - self.attr2 = wx.ListItemAttr() + self.attr2 = wx.ItemAttr() self.attr2.SetBackgroundColour("light blue") self.Bind(wx.EVT_LIST_ITEM_SELECTED, self.OnItemSelected) diff --git a/etg/listctrl.py b/etg/listctrl.py index 45974ee1..36672797 100644 --- a/etg/listctrl.py +++ b/etg/listctrl.py @@ -35,6 +35,10 @@ def run(): # Tweak the parsed meta objects in the module object as needed for # customizing the generated code and docstrings. + # Compatibility alias + module.addPyCode("""\ + ListItemAttr = wx.deprecated(ItemAttr, 'Use ItemAttr instead') + """) #------------------------------------------------------- c = module.find('wxListItem')