X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/a69276900cfae8bf48b5ba5af6811fb89675ba33..ae0205b955c7c3473231fc22246a0b25126b3100:/wxPython/tests/test_rendererButton.py diff --git a/wxPython/tests/test_rendererButton.py b/wxPython/tests/test_rendererButton.py new file mode 100644 index 0000000000..39504c255b --- /dev/null +++ b/wxPython/tests/test_rendererButton.py @@ -0,0 +1,23 @@ +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) + r = wx.Rect(10,10, 22,22) + dc.SetClippingRect(r) + rndr = wx.RendererNative.Get() + rndr.DrawComboBoxDropButton(self, dc, r) + + r.x = 50 + rndr.DrawPushButton(self, dc, r) + + +app = wx.App(False) +frm = wx.Frame(None) +pnl = TestPanel(frm) +frm.Show() +app.MainLoop()