]> git.saurik.com Git - wxWidgets.git/blob - wxPython/tests/test_rendererButton.py
fixed deadlock when calling wxPostEvent() from worker thread
[wxWidgets.git] / wxPython / tests / test_rendererButton.py
1 import wx
2
3 class TestPanel(wx.Panel):
4 def __init__(self, parent):
5 wx.Panel.__init__(self, parent)
6 self.Bind(wx.EVT_PAINT, self.OnPaint)
7
8 def OnPaint(self, evt):
9 dc = wx.PaintDC(self)
10 r = wx.Rect(10,10, 22,22)
11 dc.SetClippingRect(r)
12 rndr = wx.RendererNative.Get()
13 rndr.DrawComboBoxDropButton(self, dc, r)
14
15 r.x = 50
16 rndr.DrawPushButton(self, dc, r)
17
18
19 app = wx.App(False)
20 frm = wx.Frame(None)
21 pnl = TestPanel(frm)
22 frm.Show()
23 app.MainLoop()