parameters: (self, dc, rect, hasfocus)
docstring: Draws the selected item(s) with the Windows Vista style.
  
          :param `dc`: an instance of :class:`DC`;
          :param Rect `rect`: the rectangle to be filled with the gradient shading;
          :param bool `hasfocus`: ``True`` if the main :class:`CustomTreeCtrl` has focus, ``False``
           otherwise.
docstring_summary: Draws the selected item(s) with the Windows Vista style.
docstring_tokens: Draws the selected item ( s ) with the Windows Vista style .
function: def DrawVistaRectangle(self, dc, rect, hasfocus):
          """
          Draws the selected item(s) with the Windows Vista style.
  
          :param `dc`: an instance of :class:`DC`;
          :param Rect `rect`: the rectangle to be filled with the gradient shading;
          :param bool `hasfocus`: ``True`` if the main :class:`CustomTreeCtrl` has focus, ``False``
           otherwise.
          """
  
          if hasfocus:
              
              outer = _rgbSelectOuter
              inner = _rgbSelectInner
              top = _rgbSelectTop
              bottom = _rgbSelectBottom
  
          else:
              
              outer = _rgbNoFocusOuter
              inner = _rgbNoFocusInner
              top = _rgbNoFocusTop
              bottom = _rgbNoFocusBottom
  
          oldpen = dc.GetPen()
          oldbrush = dc.GetBrush()
  
          bdrRect = wx.Rect(*rect.Get())
          filRect = wx.Rect(*rect.Get())
          filRect.Deflate(1,1)
          
          r1, g1, b1 = int(top.Red()), int(top.Green()), int(top.Blue())
          r2, g2, b2 = int(bottom.Red()), int(bottom.Green()), int(bottom.Blue())
  
          flrect = float(filRect.height)
          if flrect < 1:
              flrect = self._lineHeight
  
          rstep = float((r2 - r1)) / flrect
          gstep = float((g2 - g1)) / flrect
          bstep = float((b2 - b1)) / flrect
  
          rf, gf, bf = 0, 0, 0
          dc.SetPen(wx.TRANSPARENT_PEN)
          
          for y in xrange(filRect.y, filRect.y + filRect.height):
              currCol = (r1 + rf, g1 + gf, b1 + bf)
              dc.SetBrush(wx.Brush(currCol, wx.SOLID))
              dc.DrawRectangle(filRect.x, y, filRect.width, 1)
              rf = rf + rstep
              gf = gf + gstep
              bf = bf + bstep
          
          dc.SetBrush(wx.TRANSPARENT_BRUSH)
          dc.SetPen(wx.Pen(outer))
          dc.DrawRoundedRectangleRect(bdrRect, 3)
          bdrRect.Deflate(1, 1)
          dc.SetPen(wx.Pen(inner))
          dc.DrawRoundedRectangleRect(bdrRect, 2)
  
          dc.SetPen(oldpen)
          dc.SetBrush(oldbrush)
function_tokens: def DrawVistaRectangle ( self , dc , rect , hasfocus ) : if hasfocus : outer = _rgbSelectOuter inner = _rgbSelectInner top = _rgbSelectTop bottom = _rgbSelectBottom else : outer = _rgbNoFocusOuter inner = _rgbNoFocusInner top = _rgbNoFocusTop bottom = _rgbNoFocusBottom oldpen = dc . GetPen ( ) oldbrush = dc . GetBrush ( ) bdrRect = wx . Rect ( * rect . Get ( ) ) filRect = wx . Rect ( * rect . Get ( ) ) filRect . Deflate ( 1 , 1 ) r1 , g1 , b1 = int ( top . Red ( ) ) , int ( top . Green ( ) ) , int ( top . Blue ( ) ) r2 , g2 , b2 = int ( bottom . Red ( ) ) , int ( bottom . Green ( ) ) , int ( bottom . Blue ( ) ) flrect = float ( filRect . height ) if flrect < 1 : flrect = self . _lineHeight rstep = float ( ( r2 - r1 ) ) / flrect gstep = float ( ( g2 - g1 ) ) / flrect bstep = float ( ( b2 - b1 ) ) / flrect rf , gf , bf = 0 , 0 , 0 dc . SetPen ( wx . TRANSPARENT_PEN ) for y in xrange ( filRect . y , filRect . y + filRect . height ) : currCol = ( r1 + rf , g1 + gf , b1 + bf ) dc . SetBrush ( wx . Brush ( currCol , wx . SOLID ) ) dc . DrawRectangle ( filRect . x , y , filRect . width , 1 ) rf = rf + rstep gf = gf + gstep bf = bf + bstep dc . SetBrush ( wx . TRANSPARENT_BRUSH ) dc . SetPen ( wx . Pen ( outer ) ) dc . DrawRoundedRectangleRect ( bdrRect , 3 ) bdrRect . Deflate ( 1 , 1 ) dc . SetPen ( wx . Pen ( inner ) ) dc . DrawRoundedRectangleRect ( bdrRect , 2 ) dc . SetPen ( oldpen ) dc . SetBrush ( oldbrush )