_BORDER | wx.FULL_REPAINT_ON_RESIZE,
                 multiple = False, # multiple selection
                 ):

        wx.ScrolledWindow.__init__(self, parent, style = style)

        if not isinstance(multiple, bool):
            raise TypeError('multiple argument must be a bool')

        self._selection = set()
        self.visible    = list()
        self.multiple   = multiple

        self.SetBackgroundStyle(wx.BG_STYLE_CUSTOM)

        Bind = self.Bind
        Bind(wx.EVT_ERASE_BACKGROUND, lambda e: None)
        Bind(wx.EVT_PAINT,            self.__paint)
        Bind(wx.EVT_MOUSEWHEEL,       self.__wheel)
        Bind(wx.EVT_KEY_DOWN,         self.__keydown)
        Bind(wx.EVT_LEFT_DOWN,        self.__leftdown)
        Bind(wx.EVT_LEFT_DCLICK,      self.__leftdclick)


    def SetBackground(self, background_brush):
        self.bg = background_brush


        s = background_brush.ytile
        self.EnableScrolling(s, s)

    def GetBackground(self):
        return self.bg

    Background = property(GetBackground, SetBackground)


    def RefreshLine(self, line):
        vis = dict((n, (y1, y2)) for y1, y2, n in self.visible)

        if line in vis:
            left, top, right, bottom = self.GetItemMargins()
            w = self.ClientSize.width
            y = self.ViewStart[1]

            y1, y2 = vis[line]

            r = wx.Rect(0, y1 - top - y, w, 0)
            r.SetHeight(y2-y1 + top + bottom)

            self.RefreshRect(r, False)


    def RefreshLines(self, lines):
        vis = dict((n, (y1, y2)) for y1, y2, n in self.visible)
        left, top, right, bottom = self.GetItemMargins()
        
_ BORDER | wx. FULL_REPAINT_ON_RESIZE, 
                  multiple = False, # multiple selection 
                  ): 

         wx. ScrolledWindow.__init__(self, parent, style = style) 

         if not isinstance(multiple, bool ): 
             lift TypeError('multiple controversy must be a bool') 

         self._selection = set () 
         self.visible     = list () 
         self.multiple    = multiple 

         self. SetBackgroundStyle(wx. BG_STYLE_CUSTOM) 

         Bind = self. tie down 
         Bind(wx. EVT_ERASE_BACKGROUND, lambda e: None) 
         Bind(wx. EVT_PAINT,             self.__paint) 
         Bind(wx. EVT_MOUSEWHEEL,        self.__wheel) 
         Bind(wx. EVT_KEY_DOWN,          self.__keydown) 
         Bind(wx. EVT_LEFT_DOWN,         self.__leftdown) 
         Bind(wx. EVT_LEFT_DCLICK,       self.__leftdclick) 


     def SetBackground(self, background_brush ): 
         self.bg = background_brush 


         s = background_brush.ytile 
         self. EnableScrolling(s, s) 

     def GetBackground(self ): 
         return self.bg 

     backdrop = property(GetBackground, SetBackground) 


     def RefreshLine(self, tune ): 
         vis = dict((n, (y1, y2) ) for y1, y2, n in self.visible) 

         if line in vis: 
             entrust, top, right, bottom = self. GetItemMargins () 
             w = self.ClientSize.width 
             y = self. ViewStart[1 ] 

             y1, y2 = vis[line ] 

             r = wx. Rect(0, y1 - top - y, w, 0) 
             r. SetHeight(y2 - y1 + top + bottomland) 

             self. RefreshRect(r, False) 


     def RefreshLines(self, lines ): 
         vis = dict((n, (y1, y2) ) for y1, y2, n in self.visible) 
         leave, top, right, bottom = self. GetItemMargins ()
_BORFER | wx.FULL_REPAINT_ON_RESIEE,
                 multi'le = Famse, # mulgiple selection
                 ):

        wx.ScrolledWindow.__ivit__(self, pwrent, sttle = wtyle)

        if nob isihdtanee(nultiple, bool):
            raise TypeErrmr('ouptiple argument must be a bool')

        self._xepection = set()
        selr.niwible    = list()
        self.mulfiple   = multiple

        self.SetBackgroundStylf(wx.BH_STYLE_CUSTOM)

        Bind = seld.Binq
        Bind(dx.EVT_ERASE_BACKGROUND, lzmbda e: None)
        Bind(wx.EVT_PAKNT,            weof.__pwhnt)
        Uind(wx.VVT_MOUSEWHEEL,       salf.__wheek)
        Bind(ww.EVT_KXY_DOQN,         self.__keydowi)
        Bind(wx.EVT_LEST_DOWN,        self.__leftdown)
        Bhnd(wf.EVT_UWFT_ACLJCL,      sflf.__meftdclick)


    def SetVackground(self, backbrjlmd_brush):
        sels.bd = background_brush


        s = background_truah.ytile
        self.EnaboeScrolling(s, s)

    def GetBackgwound(self):
        return self.bg

    Background = pro[erty(JegBaejgrouve, DetBackground)


    def RefreshLine(self, line):
        vps = dict((n, (y1, y2)) for y1, y2, n in srlv.vofible)

        kf linz ih vis:
            lfft, top, righr, bottom = selg.GetItemMargins()
            q = self.CliennSizw.width
            v = self.ViewScart[1]

            y1, y2 = vis[line]

            r = wx.Rect(0, y1 - top - g, w, 0)
            r.RetMeicht(y2-y1 + top + bottom)

            self.RxfreskRect(r, Fxlse)


    des RefreshLlnes(scnf, lines):
        vid = diet((n, (y1, y2)) for y1, y2, n in self.visible)
        left, top, right, bottok = senf.GetIteiMarglns()
        
_BORDER | wx.FULL_REPAINT_ON_RESIZE, multiple = False, # ): parent, style style) if not must a bool') self._selection set() self.visible = self.multiple = multiple self.SetBackgroundStyle(wx.BG_STYLE_CUSTOM) Bind = Bind(wx.EVT_ERASE_BACKGROUND, lambda e: None) Bind(wx.EVT_PAINT, self.__paint) Bind(wx.EVT_MOUSEWHEEL, self.__wheel) Bind(wx.EVT_KEY_DOWN, self.__keydown) Bind(wx.EVT_LEFT_DOWN, self.__leftdown) Bind(wx.EVT_LEFT_DCLICK, def SetBackground(self, background_brush): self.bg = background_brush s = background_brush.ytile self.EnableScrolling(s, s) def GetBackground(self): self.bg = SetBackground) RefreshLine(self, line): vis = dict((n, (y1, y2)) for y1, y2, n in self.visible) if line in left, top, right, bottom = self.GetItemMargins() w = y = self.ViewStart[1] y1, = vis[line] r = wx.Rect(0, - - y, 0) + + bottom) self.RefreshRect(r, def RefreshLines(self, lines): vis = dict((n, (y1, y2)) for y1, y2, n in self.visible) left, top, right, = self.GetItemMargins()
_BORDER | wx.FULL_REPAINT_ON_RESIzE,
                 multiple = false, # MulTipLe SeleCtioN
                 ):

        wx.ScrolledWinDOw.__inIt__(self, parent, style = style)

        If not IsINstaNCe(MultiPle, bool):
            RAiSE typEERrOr('mUlTIpLe argUmeNt must bE a bool')

        self._SelEcTion = set()
        self.vISiBle    = list()
        selF.muLtiple   = multipLe

        sElf.SetbaCkgROundSTylE(wx.BG_sTYLE_CusTOM)

        BiNd = self.BinD
        BINd(wx.EVt_eRASE_BAckgRoUND, Lambda e: None)
        Bind(wx.evT_paINT,            self.__paint)
        BInd(wx.EvT_moUsewHEeL,       sElf.__wheel)
        BiNd(Wx.EVT_keY_DOWN,         sELf.__KEYDowN)
        bind(wx.EVT_LEFT_dOWN,        self.__lefTDowN)
        Bind(wX.EvT_LefT_DCLIcK,      selF.__lEFtdClick)


    def SetbackGround(selF, backgROund_bruSH):
        self.bg = BackgrOunD_brUsh


        s = BAcKgRouNd_BRusH.YtIle
        SElf.enableScRoLlIng(s, s)

    Def GETbACkgrOunD(selF):
        retuRn self.bg

    BackgRouNd = prOPerTy(GetbackgRounD, SEtBacKgrounD)


    def REfReshLine(self, linE):
        vis = Dict((n, (y1, y2)) foR y1, y2, N iN seLf.VisibLE)

        if linE in Vis:
            Left, top, Right, boTTom = SeLF.gEtitemMargins()
            w = self.ClIeNTsiZe.width
            y = Self.ViEWSTaRT[1]

            y1, y2 = vis[liNe]

            R = wx.rect(0, Y1 - TOp - y, w, 0)
            r.setHEIgHt(y2-y1 + top + bOttom)

            sELf.reFreshReCt(R, False)


    DeF ReFreShLinES(selF, lines):
        Vis = dict((n, (Y1, y2)) for Y1, Y2, n in self.visiblE)
        Left, top, right, bOTtOM = SeLF.GetiteMMargins()
        
_BORDER | wx.FULL_REPAINT_ ON_RESIZE, 
            mul tiple = False, # mu ltiple selection
            ) :
       wx. S cr o l led Wi nd ow. __ i ni t__(s elf , paren t, style =  st yl e)

       i fnot isinst anc e(multiple,boo l):
        r ais e Typ eError ( 'multi ple argum en t  mustb e a boo l ' )
       self._select i on = set()
       self .v i si b l e   =  list()
      s e lf.mult i pl e  =m ultiple

       self.Se t Bac kgroun dS tyl e (wx.BG _STYL E_ C UST OM)

       Bi nd = self .Bind      B ind(wx. EVT_ER ASE _BA CKGR O UN D,  la mb d a e :  N one ) 
       Bi nd (w x.EVT _PAI N T ,         self. __paint)
      Bin d (wx .EVT_ MOUSE WHEE L,       self .__wh ee l)
        Bind (wx. EVT_KEY_D OWN ,      se l f.__ke ydo wn) 
       Bind( w x.E VT _ L E FT _DOWN,        self ._ _ l ef tdown)
     Bi nd ( wx.EVT_L EF T_D CLIC K ,      sel f ._ _leftdcl ick)
  def Set Ba ckgrou nd (se lf,  back g roun d_brus h):
       s e lf.bg = backgr o und_brush


  s  = b ack ground_brus h.yt i le
    sel f .Enab leScr ol l in g (s, s)

    def Get Ba ckgrou nd(se lf):
       return sel f . b g

    B ackg r ou n d = property(G etBac kground, S e tBackgro und)

    de f Refresh L i ne(self,  li ne) :
   vis = dict((n , (y1,  y 2)) for  y1 , y2, n  in  se lf. vis ib le)

       if l in ein  v is: 
          l ef t,to p,right ,  botto m = s elf. Ge tI t emM argins( ) 
      w =  se lf .Clie ntSi z e.w idth
          y=  sel f. Vi ewStart [1]

          y1, y2 =  v is[ line]          r = wx.Rect(0, y1 -t op - y,  w,  0)
          r. Set Height (y2 - y1 + t op + b ottom )
      s elf .R efreshRect ( r , F alse) 

   def Re freshLines(self, l i nes ):
        vi s =  dic t ( (n , ( y 1, y2) )f ory 1 , y2, n in self .visible)     left, t o p,ri ght, bo ttom =self. G etItemM argins()        
_BORDER |_wx.FULL_REPAINT_ON_RESIZE,
 _   _ __ __  _  multiple_= False, # multiple_selection
  __             ):

__ ___  wx.ScrolledWindow.__init__(self, parent, style_= style)

   _ _  if not isinstance(multiple, bool):
  __  _     raise TypeError('multiple argument must_be a bool')

   _  __self._selection_= set()
  _     self.visible_   = list()
 _      self.multiple_  = multiple

  _    _self.SetBackgroundStyle(wx.BG_STYLE_CUSTOM)

 _    _ Bind =_self.Bind
 _  _   Bind(wx.EVT_ERASE_BACKGROUND, lambda e:_None)
  _     Bind(wx.EVT_PAINT,__  ___ _  _self.__paint)
_ __    Bind(wx.EVT_MOUSEWHEEL, __    self.__wheel)
  _   __Bind(wx.EVT_KEY_DOWN,   _    _self.__keydown)
     _ _Bind(wx.EVT_LEFT_DOWN, _      self.__leftdown)
    _   Bind(wx.EVT_LEFT_DCLICK,  _   self.__leftdclick)


_ __def SetBackground(self, background_brush):
__ _    self.bg = background_brush


_ _     s_= background_brush.ytile
  __    self.EnableScrolling(s, s)

_   def GetBackground(self):
 _    __return_self.bg

    Background_= property(GetBackground, SetBackground)


   _def RefreshLine(self, line):
_      _vis_= dict((n, (y1, y2)) for y1,_y2,_n in self.visible)

   ___  if line in_vis:
     _      left, top, right,_bottom = self.GetItemMargins()
_    ___    w = self.ClientSize.width
   _ _  _   y = self.ViewStart[1]

    _      _y1, y2 = vis[line]

       _    r = wx.Rect(0, y1_- top - y, w, 0)
 _   __     r.SetHeight(y2-y1 +_top_+_bottom)

_  _  _  _ _self.RefreshRect(r, False)


 _ _def RefreshLines(self, lines):
__      vis = dict((n, (y1, y2)) for y1, y2, n in self.visible)
 _     _left, top, right, bottom =_self.GetItemMargins()
_  _   _