home *** CD-ROM | disk | FTP | other *** search
/ Maximum CD 2009 June / maximum-cd-2009-06.iso / DiscContents / digsby_setup.exe / lib / gui / uberwidgets / uberbook / SamplePanel.pyo (.txt) < prev    next >
Encoding:
Python Compiled Bytecode  |  2009-02-26  |  1.5 KB  |  27 lines

  1. # Source Generated with Decompyle++
  2. # File: in.pyo (Python 2.5)
  3.  
  4. import wx
  5. from gui.toolbox import get_wxColor
  6. from util import do
  7.  
  8. class SamplePanel(wx.Panel):
  9.     
  10.     def __init__(self, parent, color = 'red'):
  11.         wx.Panel.__init__(self, parent, style = 0)
  12.         self.name = color
  13.         events = [
  14.             (wx.EVT_PAINT, self.OnPaint),
  15.             (wx.EVT_ERASE_BACKGROUND, (lambda e: pass))]
  16.         (do,)((lambda .0: for event, method in .0:
  17. self.Bind(event, method))(events))
  18.  
  19.     
  20.     def OnPaint(self, event):
  21.         dc = wx.BufferedPaintDC(self)
  22.         rect = wx.RectS(self.GetSize())
  23.         dc.SetBrush(wx.Brush(get_wxColor(self.name)))
  24.         dc.DrawRectangleRect(rect)
  25.  
  26.  
  27.