Ensure Tree Mixin text visibility against a white background

This commit is contained in:
Samuel Dunn
2017-02-14 23:22:17 +00:00
parent 3f01517c83
commit 9e54e65d6f

View File

@@ -84,13 +84,13 @@ class DemoTreeMixin(treemixin.VirtualTree, treemixin.DragAndDrop,
def OnGetItemTextColour(self, indices): def OnGetItemTextColour(self, indices):
# Show how to change the item text colour. In this case second level # Show how to change the item text colour. In this case second level
# items are coloured red and third level items are blue. All other # items are coloured red and third level items are blue. All other
# items have the default text colour. # items are black
if len(indices) % 2 == 0: if len(indices) % 2 == 0:
return wx.RED return wx.RED
elif len(indices) % 3 == 0: elif len(indices) % 3 == 0:
return wx.BLUE return wx.BLUE
else: else:
return super(DemoTreeMixin, self).OnGetItemTextColour(indices) return wx.BLACK
def OnGetItemBackgroundColour(self, indices): def OnGetItemBackgroundColour(self, indices):
# Show how to change the item background colour. In this case the # Show how to change the item background colour. In this case the