parameters: (self, newdir)
docstring: Recreates the folder combobox every time a new directory is explored.
  
          :param `newdir`: the new folder to be explored.
docstring_summary: Recreates the folder combobox every time a new directory is explored.
docstring_tokens: Recreates the folder combobox every time a new directory is explored .
function: def RecreateComboBox(self, newdir):
          """
          Recreates the folder combobox every time a new directory is explored.
  
          :param `newdir`: the new folder to be explored.
          """
          
          newdir = newdir.strip()
          
          if opj(newdir) in self._combochoices:
              return
  
          self.Freeze()
  
          self._sizer.Detach(0)
          self._subsizer.Detach(1)
          self._subsizer.Destroy()
          self._combo.Destroy()
  
          subsizer = wx.BoxSizer(wx.HORIZONTAL)
          
          self._combochoices.insert(0, opj(newdir))
          
          self._combo = wx.ComboBox(self, -1, value=newdir, choices=self._combochoices,
                                    style=wx.CB_DROPDOWN | wx.CB_READONLY)
  
          subsizer.Add((3, 0), 0)
          subsizer.Add(self._combo, 1, wx.EXPAND | wx.TOP, 3)
          subsizer.Add((3, 0), 0)
          self._sizer.Insert(0, subsizer, 0, wx.EXPAND | wx.ALL, 3)
  
          self._subsizer = subsizer
      
          self._subsizer.Layout()
  
          if not self.GetShowComboBox():
              self._sizer.Show(0, False)
              
          self._sizer.Layout()
  
          self._combo.Bind(wx.EVT_COMBOBOX, self.OnComboBox)
          
          self.Thaw()
function_tokens: def RecreateComboBox ( self , newdir ) : newdir = newdir . strip ( ) if opj ( newdir ) in self . _combochoices : return self . Freeze ( ) self . _sizer . Detach ( 0 ) self . _subsizer . Detach ( 1 ) self . _subsizer . Destroy ( ) self . _combo . Destroy ( ) subsizer = wx . BoxSizer ( wx . HORIZONTAL ) self . _combochoices . insert ( 0 , opj ( newdir ) ) self . _combo = wx . ComboBox ( self , - 1 , value = newdir , choices = self . _combochoices , style = wx . CB_DROPDOWN | wx . CB_READONLY ) subsizer . Add ( ( 3 , 0 ) , 0 ) subsizer . Add ( self . _combo , 1 , wx . EXPAND | wx . TOP , 3 ) subsizer . Add ( ( 3 , 0 ) , 0 ) self . _sizer . Insert ( 0 , subsizer , 0 , wx . EXPAND | wx . ALL , 3 ) self . _subsizer = subsizer self . _subsizer . Layout ( ) if not self . GetShowComboBox ( ) : self . _sizer . Show ( 0 , False ) self . _sizer . Layout ( ) self . _combo . Bind ( wx . EVT_COMBOBOX , self . OnComboBox ) self . Thaw ( )