Merge pull request #22 from wernerfb/2015-july-demo

demo corrections and loosening demo version check
This commit is contained in:
Robin Dunn
2016-02-27 16:50:47 -08:00
3 changed files with 7 additions and 5 deletions

View File

@@ -33,7 +33,7 @@ class MyColLabelRenderer(glr.GridLabelRenderer):
def Draw(self, grid, dc, rect, col):
dc.SetBrush(wx.Brush(self._bgcolor))
dc.SetPen(wx.TRANSPARENT_PEN)
dc.DrawRectangleRect(rect)
dc.DrawRectangle(rect)
hAlign, vAlign = grid.GetColLabelAlignment()
text = grid.GetColLabelValue(col)
self.DrawBorder(grid, dc, rect)

View File

@@ -220,7 +220,7 @@ class MegaImageRenderer(Grid.GridCellRenderer):
else:
dc.SetBrush(wx.Brush(wx.WHITE, wx.BRUSHSTYLE_SOLID))
dc.SetPen(wx.Pen(wx.WHITE, 1, wx.PENSTYLE_SOLID))
dc.DrawRectangleRect(rect)
dc.DrawRectangle(rect)
# copy the image but only to the size of the grid cell
@@ -265,7 +265,7 @@ class MegaFontRenderer(Grid.GridCellRenderer):
else:
dc.SetBrush(wx.Brush(wx.WHITE, wx.BRUSHSTYLE_SOLID))
dc.SetPen(wx.Pen(wx.WHITE, 1, wx.PENSTYLE_SOLID))
dc.DrawRectangleRect(rect)
dc.DrawRectangle(rect)
text = self.table.GetValue(row, col)
dc.SetBackgroundMode(wx.SOLID)

View File

@@ -56,6 +56,8 @@ import re
import shutil
from threading import Thread
from distutils.version import LooseVersion
import wx
import wx.adv
import wx.lib.agw.aui as aui
@@ -2879,7 +2881,7 @@ class MySplashScreen(SplashScreen):
from wx.lib.mixins.treemixin import ExpansionState
if USE_CUSTOMTREECTRL:
import wx.lib.customtreectrl as CT
import wx.lib.agw.customtreectrl as CT
TreeBaseClass = CT.CustomTreeCtrl
else:
TreeBaseClass = wx.TreeCtrl
@@ -2925,7 +2927,7 @@ class MyApp(wx.App, wx.lib.mixins.inspection.InspectionMixin):
def OnInit(self):
# Check runtime version
if version.VERSION_STRING != wx.VERSION_STRING:
if LooseVersion(version.VERSION_STRING) >= LooseVersion(wx.VERSION_STRING):
wx.MessageBox(caption="Warning",
message="You're using version %s of wxPython, but this copy of the demo was written for version %s.\n"
"There may be some version incompatibilities..."