minor tweaks

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@28292 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Robin Dunn
2004-07-17 22:57:33 +00:00
parent b39c3fa09a
commit 35ee3288c6
2 changed files with 4 additions and 3 deletions

View File

@@ -14,7 +14,7 @@ class MyVListBox(wx.VListBox):
if self.GetSelection() == n:
c = wx.SystemSettings.GetColour(wx.SYS_COLOUR_HIGHLIGHTTEXT)
else:
c = self.GetForegroundColour()#wx.SystemSettings.GetColour(wx.SYS_COLOUR_HIGHLIGHTTEXT)
c = self.GetForegroundColour()
dc.SetFont(self.GetFont())
dc.SetTextForeground(c)
dc.DrawLabel(self._getItemText(n), rect,
@@ -24,11 +24,9 @@ class MyVListBox(wx.VListBox):
# required to draw the n'th item.
def OnMeasureItem(self, n):
height = 0
for line in self._getItemText(n).split('\n'):
w, h = self.GetTextExtent(line)
height += h
return height + 5