home *** CD-ROM | disk | FTP | other *** search
- # Source Generated with Decompyle++
- # File: in.pyo (Python 2.5)
-
- import wx
- from gui.toolbox import get_wxColor
- from util import do
-
- class SamplePanel(wx.Panel):
-
- def __init__(self, parent, color = 'red'):
- wx.Panel.__init__(self, parent, style = 0)
- self.name = color
- events = [
- (wx.EVT_PAINT, self.OnPaint),
- (wx.EVT_ERASE_BACKGROUND, (lambda e: pass))]
- (do,)((lambda .0: for event, method in .0:
- self.Bind(event, method))(events))
-
-
- def OnPaint(self, event):
- dc = wx.BufferedPaintDC(self)
- rect = wx.RectS(self.GetSize())
- dc.SetBrush(wx.Brush(get_wxColor(self.name)))
- dc.DrawRectangleRect(rect)
-
-
-