parameters: (self, canvwidth=None, canvheight=None, bg = None)
docstring: Adjust canvas and scrollbars according to given canvas size.
docstring_summary: Adjust canvas and scrollbars according to given canvas size.
docstring_tokens: Adjust canvas and scrollbars according to given canvas size .
function: def reset(self, canvwidth=None, canvheight=None, bg = None):
          """Adjust canvas and scrollbars according to given canvas size."""
          if canvwidth:
              self.canvwidth = canvwidth
          if canvheight:
              self.canvheight = canvheight
          if bg:
              self.bg = bg
          self._canvas.config(bg=bg,
                          scrollregion=(-self.canvwidth//2, -self.canvheight//2,
                                         self.canvwidth//2, self.canvheight//2))
          self._canvas.xview_moveto(0.5*(self.canvwidth - self.width + 30) /
                                                                 self.canvwidth)
          self._canvas.yview_moveto(0.5*(self.canvheight- self.height + 30) /
                                                                self.canvheight)
          self.adjustScrolls()
function_tokens: def reset ( self , canvwidth = None , canvheight = None , bg = None ) : if canvwidth : self . canvwidth = canvwidth if canvheight : self . canvheight = canvheight if bg : self . bg = bg self . _canvas . config ( bg = bg , scrollregion = ( - self . canvwidth // 2 , - self . canvheight // 2 , self . canvwidth // 2 , self . canvheight // 2 ) ) self . _canvas . xview_moveto ( 0.5 * ( self . canvwidth - self . width + 30 ) / self . canvwidth ) self . _canvas . yview_moveto ( 0.5 * ( self . canvheight - self . height + 30 ) / self . canvheight ) self . adjustScrolls ( )