code: def on_widget__configure_event(self, widget, event):
          '''
          Called when size of drawing area changes.
          '''
          if event.x < 0 and event.y < 0:
              # Widget has not been allocated a size yet, so do nothing.
              return
          self.resize(event.width, event.heightf on_widget__configure_event(self, widget, event):
          '''
          Called when size of drawing area changes.
          '''
          if event.x < 0 and event.y < 0:
              # Widget has not been allocated a size yet, so do nothing.
              return
          self.resize(event.width, event.height)
docs: Called when size of drawing area changes.