X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/8fa876ca9ec87e90605808bfcab4d4226965dbad..66ff56694e325552c86c5f7b17d4498f8580f427:/wxPython/demo/wxVListBox.py diff --git a/wxPython/demo/wxVListBox.py b/wxPython/demo/wxVListBox.py index b588fba1e0..cbe7707698 100644 --- a/wxPython/demo/wxVListBox.py +++ b/wxPython/demo/wxVListBox.py @@ -15,6 +15,11 @@ class MyVListBox(wx.VListBox): # n'th item on the dc within the rect. How it is drawn, and what # is drawn is entirely up to you. def OnDrawItem(self, dc, rect, n): + if self.GetSelection() == n: + c = wx.SystemSettings.GetColour(wx.SYS_COLOUR_HIGHLIGHTTEXT) + else: + c = self.GetForegroundColour()#wx.SystemSettings.GetColour(wx.SYS_COLOUR_HIGHLIGHTTEXT) + dc.SetTextForeground(c) dc.DrawLabel(self._getItemText(n), rect, wx.ALIGN_LEFT | wx.ALIGN_CENTER_VERTICAL)