parameters: (self, event)
docstring: Handles the ``wx.EVT_PAINT`` event for :class:`TabNavigatorWindow` top panel.
  
          :param `event`: a :class:`PaintEvent` event to be processed.
docstring_summary: Handles the ``wx.EVT_PAINT`` event for :class:`TabNavigatorWindow` top panel.
docstring_tokens: Handles the wx . EVT_PAINT event for : class : TabNavigatorWindow top panel .
function: def OnPanelPaint(self, event):
          """
          Handles the ``wx.EVT_PAINT`` event for :class:`TabNavigatorWindow` top panel.
  
          :param `event`: a :class:`PaintEvent` event to be processed.
          """
  
          dc = wx.PaintDC(self._panel)
          rect = self._panel.GetClientRect()
  
          bmp = wx.EmptyBitmap(rect.width, rect.height)
  
          mem_dc = wx.MemoryDC()
          mem_dc.SelectObject(bmp)
  
          endColour = wx.SystemSettings_GetColour(wx.SYS_COLOUR_BTNSHADOW)
          startColour = LightColour(endColour, 50)
          mem_dc.GradientFillLinear(rect, startColour, endColour, wx.SOUTH)
  
          # Draw the caption title and place the bitmap
          # get the bitmap optimal position, and draw it
          bmpPt, txtPt = wx.Point(), wx.Point()
          bmpPt.y = (rect.height - self._props.Icon.GetHeight())/2
          bmpPt.x = 3
          mem_dc.DrawBitmap(self._props.Icon, bmpPt.x, bmpPt.y, True)
  
          # get the text position, and draw it
          font = wx.SystemSettings_GetFont(wx.SYS_DEFAULT_GUI_FONT)
          font.SetWeight(wx.BOLD)
          mem_dc.SetFont(font)
          fontHeight = mem_dc.GetCharHeight()
  
          txtPt.x = bmpPt.x + self._props.Icon.GetWidth() + 4
          txtPt.y = (rect.height - fontHeight)/2
          mem_dc.SetTextForeground(wx.WHITE)
          mem_dc.DrawText("Opened tabs:", txtPt.x, txtPt.y)
          mem_dc.SelectObject(wx.NullBitmap)
  
          dc.DrawBitmap(bmp, 0, 0)
function_tokens: def OnPanelPaint ( self , event ) : dc = wx . PaintDC ( self . _panel ) rect = self . _panel . GetClientRect ( ) bmp = wx . EmptyBitmap ( rect . width , rect . height ) mem_dc = wx . MemoryDC ( ) mem_dc . SelectObject ( bmp ) endColour = wx . SystemSettings_GetColour ( wx . SYS_COLOUR_BTNSHADOW ) startColour = LightColour ( endColour , 50 ) mem_dc . GradientFillLinear ( rect , startColour , endColour , wx . SOUTH ) # Draw the caption title and place the bitmap # get the bitmap optimal position, and draw it bmpPt , txtPt = wx . Point ( ) , wx . Point ( ) bmpPt . y = ( rect . height - self . _props . Icon . GetHeight ( ) ) / 2 bmpPt . x = 3 mem_dc . DrawBitmap ( self . _props . Icon , bmpPt . x , bmpPt . y , True ) # get the text position, and draw it font = wx . SystemSettings_GetFont ( wx . SYS_DEFAULT_GUI_FONT ) font . SetWeight ( wx . BOLD ) mem_dc . SetFont ( font ) fontHeight = mem_dc . GetCharHeight ( ) txtPt . x = bmpPt . x + self . _props . Icon . GetWidth ( ) + 4 txtPt . y = ( rect . height - fontHeight ) / 2 mem_dc . SetTextForeground ( wx . WHITE ) mem_dc . DrawText ( "Opened tabs:" , txtPt . x , txtPt . y ) mem_dc . SelectObject ( wx . NullBitmap ) dc . DrawBitmap ( bmp , 0 , 0 )