parameters: (self, event)
docstring: Handles the ``wx.EVT_PAINT`` for :class:`CustomPanel`.
  
          :param `event`: a :class:`PaintEvent` event to be processed.
docstring_summary: Handles the ``wx.EVT_PAINT`` for :class:`CustomPanel`.
docstring_tokens: Handles the wx . EVT_PAINT for : class : CustomPanel .
function: def OnPaint(self, event):
          """
          Handles the ``wx.EVT_PAINT`` for :class:`CustomPanel`.
  
          :param `event`: a :class:`PaintEvent` event to be processed.
          """
  
          dc = wx.AutoBufferedPaintDC(self)
          dc.SetBackground(wx.Brush(self.GetParent().GetBackgroundColour()))
          dc.Clear()
  
          self.PaintCustomColours(dc)
          self.PaintHighlight(dc, True)
function_tokens: def OnPaint ( self , event ) : dc = wx . AutoBufferedPaintDC ( self ) dc . SetBackground ( wx . Brush ( self . GetParent ( ) . GetBackgroundColour ( ) ) ) dc . Clear ( ) self . PaintCustomColours ( dc ) self . PaintHighlight ( dc , True )