Don't change the tree fonts when running on the older comctl
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_8_BRANCH@46004 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -1539,10 +1539,17 @@ class wxPythonDemo(wx.Frame):
|
||||
|
||||
treeFont = self.tree.GetFont()
|
||||
catFont = self.tree.GetFont()
|
||||
treeFont.SetPointSize(10)
|
||||
treeFont.SetWeight(wx.BOLD)
|
||||
|
||||
# The old native treectrl on MSW has a bug where it doesn't
|
||||
# draw all of the text for an item if the font is larger than
|
||||
# the default. It seems to be clipping the item's label as if
|
||||
# it was the size of the same label in the default font.
|
||||
if 'wxMSW' not in wx.PlatformInfo or wx.GetApp().GetComCtl32Version() >= 600:
|
||||
treeFont.SetPointSize(treeFont.GetPointSize()+2)
|
||||
treeFont.SetWeight(wx.BOLD)
|
||||
catFont.SetWeight(wx.BOLD)
|
||||
|
||||
self.tree.SetItemFont(self.root, treeFont)
|
||||
catFont.SetWeight(wx.BOLD)
|
||||
|
||||
firstChild = None
|
||||
selectItem = None
|
||||
|
Reference in New Issue
Block a user