def resize( self, w, h ):
        """
        Handles resize events for the canv widget.  Adjusts the height and width
        of the canvas for the progress bar calculations.
        
        Arguments:
          w: The new width
          h: The new height
        """
        self.w = w
        self.h = h
        self.canv.delete( 'frame' )
        self.canv.create_rectangle( 1, 1, self.w, self.h, outline='black',
                                    fill='gray75', tag='frame' )

        Handles resize events for the canv widget.  Adjusts the height and width
        of the canvas for the progress bar calculations.
        
        Arguments:
          w: The new width
          h: The new height
        
recipes/Python/576674_StatusMeter_widget_for_Tkinter/recipe-576674.py