Some random test apps that I've been playing with

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@42803 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Robin Dunn
2006-10-31 00:59:32 +00:00
parent 5c9d9745fe
commit 6ed100b4a1
8 changed files with 1077 additions and 0 deletions

View File

@@ -0,0 +1,35 @@
import wx
##import os; print os.getpid(); raw_input("press enter...")
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.GCDC(wx.PaintDC(self))
#dc = wx.PaintDC(self)
r = wx.Rect(64, 25, 45, 18)
dc.SetPen(wx.Pen("black", 1))
dc.SetBrush(wx.Brush("red"))
dc.DrawRectangleRect(r)
dc.SetPen(wx.TRANSPARENT_PEN)
#dc.SetPen(wx.Pen("light blue", 1))
dc.SetBrush(wx.Brush("light blue"))
dc.DrawRectangle(r.x+1, r.y+1, r.width-2, r.height-2)
dc.SetPen(wx.Pen("black", 1))
dc.DrawLine(r.x+r.width+02, r.y,
r.x+r.width+15, r.y)
dc.DrawLine(r.x+r.width+02, r.y+r.height-1,
r.x+r.width+15, r.y+r.height-1)
app = wx.App(False)
frm = wx.Frame(None)
pnl = TestPanel(frm)
frm.Show()
app.MainLoop()