test for mac theme brush

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@43174 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Robin Dunn
2006-11-07 21:43:51 +00:00
parent c04bcba0d6
commit 4f13d3825e

View File

@@ -0,0 +1,25 @@
import wx
class TestPanel(wx.Panel):
def __init__(self, parent):
wx.Panel.__init__(self, parent)
self.Bind(wx.EVT_PAINT, self.OnPaint)
def OnPaint(self, evt):
dc = wx.PaintDC(self)
br = wx.Brush("light blue")
dc.SetBrush(br)
dc.DrawRectangle(10,10, 50,50)
br = wx.Brush(self.GetBackgroundColour())
br.MacSetTheme(1)
dc.SetBrush(br)
dc.DrawRectangle(80,10, 50,50)
app = wx.App(False)
frm = wx.Frame(None)
pnl = TestPanel(frm)
frm.Show()
app.MainLoop()