wxWidgets/wxPython/tests/test_macbrush.py
Robin Dunn 4f13d3825e test for mac theme brush
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@43174 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2006-11-07 21:43:51 +00:00

26 lines
553 B
Python

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()